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:
Andrey Semashev
2025-06-12 18:33:25 +03:00
parent 002caaa54f
commit 1a28d9d60f

View File

@ -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; }