[PATCH] D45179: [libc++] Add _LIBCPP_FORCE_NODISCARD define to force-enable nodiscard in pre-C++17

John McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 3 15:11:06 PDT 2018


rjmccall added a comment.

Yes, if we think that the committee is likely to include questionable functions on the `[[nodiscard]]` list which we don't want to warn about pre-C++17, then it makes sense to have two internal macros, one for functions like `std::move` that should be unconditionally warned about and one for the iffy-bu-standard-directed cases.


Repository:
  rCXX libc++

https://reviews.llvm.org/D45179





More information about the cfe-commits mailing list