mirror of
https://github.com/boostorg/detail.git
synced 2025-07-30 12:27:15 +02:00
Mark bitmask_set generated by BOOST_BITMASK as deprecated.
This function is not really needed and can be replaced with double negation (!!) or comparison with an enum value of zero. We should prefer to minimize polluting the user's namespace with new names.
This commit is contained in:
@ -83,6 +83,7 @@ using underlying_type_t = typename std::underlying_type< Enum >::type;
|
||||
inline BOOST_CONSTEXPR bool operator!(Bitmask x) BOOST_NOEXCEPT \
|
||||
{ return !static_cast< ::boost::detail::bitmask::underlying_type_t< Bitmask > >(x); } \
|
||||
\
|
||||
BOOST_DEPRECATED("bitmask_set(enum) is deprecated, use !!enum or comparison operators instead") \
|
||||
inline BOOST_CONSTEXPR bool bitmask_set(Bitmask x) BOOST_NOEXCEPT \
|
||||
{ return !!x; }
|
||||
|
||||
|
Reference in New Issue
Block a user