mirror of
https://github.com/boostorg/config.git
synced 2025-07-30 04:17:16 +02:00
Expand BOOST_ATTRIBUTE_UNUSED [[maybe_unused]]
When available, supersedes: https://github.com/boostorg/config/pull/456
This commit is contained in:
@ -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]]:
|
||||
//
|
||||
|
Reference in New Issue
Block a user