Merge pull request #272 from boostorg/nodiscard

Add support for [[nodiscard]]
This commit is contained in:
jzmaddock authored and GitHub committed 2019-04-02 13:24:34 +01:00
commit fb746fc6fb
3 files changed
+16

No files matched your search

+11
View File
@@ -992,6 +992,17 @@ namespace std{ using ::type_info; }
#ifndef BOOST_ATTRIBUTE_UNUSED
# define BOOST_ATTRIBUTE_UNUSED
#endif
//
// [[nodiscard]]:
//
#ifdef __has_cpp_attribute
#if __has_cpp_attribute(nodiscard)
# define BOOST_ATTRIBUTE_NODISCARD [[nodiscard]]
#endif
#endif
#ifndef BOOST_ATTRIBUTE_NODISCARD
# define BOOST_ATTRIBUTE_NODISCARD
#endif
#define BOOST_STATIC_CONSTEXPR static BOOST_CONSTEXPR_OR_CONST