forked from boostorg/config
Merge pull request #272 from boostorg/nodiscard
Add support for [[nodiscard]]
This commit is contained in:
3 files changed
+16
No files matched your search
@@ -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
|
||||
|
||||
|
||||
Reference in new issue
Block a user