[libcxx-commits] [PATCH] D65900: [libc++] Use [[nodiscard]] for lock_guard, as an extension
Dávid Bolvanský via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Aug 8 12:20:55 PDT 2019
xbolva00 added inline comments.
Comment at: libcxx/include/__config:1016
+ // Standard specifies the constructor as [[nodiscard]]
+# define _LIBCPP_NODISCARD_CTOR _LIBCPP_NODISCARD
> What happens when we apply this attribute to a constructor with a compiler that doesn't yet support it?
> Does the warning escape the system header?
If compiler returns >= 201907L, it have to support nodiscard on ctors.
Hopefully no compiler just bumps it to 201907L and does not support it.
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
More information about the libcxx-commits