lebedev.ri added inline comments.

================
Comment at: include/__config:1016
+// because GCC does not silence them via (void) cast.
+#if __has_cpp_attribute(nodiscard) && _LIBCPP_STD_VER > 17
+#  define _LIBCPP_NODISCARD [[nodiscard]]
----------------
mclow.lists wrote:
> `[[nodiscard]]` is a C++17 feature. This test should be `>=`, not `>`.
Indeed, though the left hand side of the diff already specified 
`_LIBCPP_STD_VER > 17`.
Interesting, isn't it.


================
Comment at: include/__config:1026
+    (_LIBCPP_STD_VER > 17 || defined(_LIBCPP_FORCE_NODISCARD))
+#  define _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_NODISCARD
 #else
----------------
mclow.lists wrote:
> I wouldn't change this; just leave it as `[[nodiscard]]`
But that would defy the purpose?


Repository:
  rCXX libc++

https://reviews.llvm.org/D45179



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to