[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 14:31:48 PDT 2018
rjmccall added a comment.
Is Marshall arguing that the standard doesn't allow compilers to warn about failing to use these function results prior to C++17? Because I don't think that's true; warnings are thoroughly non-normative.
If libc++ wants to allow its users to opt out of these warnings just for libc++ functions, that's fine (although unusual), but it seems to me that that ought to be an explicit opt-out that's independent of language version.
Repository:
rCXX libc++
https://reviews.llvm.org/D45179
More information about the cfe-commits
mailing list