Merge pull request #457 from boostorg/unused

Expand BOOST_ATTRIBUTE_UNUSED [[maybe_unused]]
This commit is contained in:
jzmaddock
2022-11-16 19:29:08 +00:00
committed by GitHub

View File

@ -1071,9 +1071,22 @@ namespace std{ using ::type_info; }
//
// Unused variable/typedef workarounds:
//
#ifndef BOOST_ATTRIBUTE_UNUSED
# if defined(__has_attribute) && defined(__SUNPRO_CC) && (__SUNPRO_CC > 0x5130)
# if __has_attribute(maybe_unused)
# define BOOST_ATTRIBUTE_UNUSED [[maybe_unused]]
# endif
# elif defined(__has_cpp_attribute)
# if __has_cpp_attribute(maybe_unused)
# define BOOST_ATTRIBUTE_UNUSED [[maybe_unused]]
# endif
# endif
#endif
#ifndef BOOST_ATTRIBUTE_UNUSED
# define BOOST_ATTRIBUTE_UNUSED
#endif
//
// [[nodiscard]]:
//