[PATCH] D45179: [libc++] Add _LIBCPP_FORCE_NODISCARD define to force-enable nodiscard in pre-C++17
Roman Lebedev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 3 14:40:58 PDT 2018
lebedev.ri added a comment.
In https://reviews.llvm.org/D45179#1056183, @rjmccall wrote:
> Is Marshall arguing that the standard doesn't allow compilers to warn about failing to use these function results prior to C++17?
No. He was simply saying that people are opposed to having nodiscard attribute specified when the standard does not require that yet.
For same reason, this has to be an opt-in (`_LIBCPP_FORCE_NODISCARD`), it can't be just an opt-out.
But, you might as well just ask him that.
Repository:
rCXX libc++
https://reviews.llvm.org/D45179
More information about the cfe-commits
mailing list