Don't repeat the preprocessing condition to specialize std::hash

This commit is contained in:
Gennaro Prota
2025-09-02 19:56:42 +02:00
parent dc2a88e9a7
commit c12ffc8b37
3 changed files with 6 additions and 2 deletions

View File

@@ -56,4 +56,8 @@ make_non_const( T t )
#endif
#if ! defined( BOOST_NO_CXX11_HDR_FUNCTIONAL ) && ! defined( BOOST_DYNAMIC_BITSET_NO_STD_HASH )
# define BOOST_DYNAMIC_BITSET_SPECIALIZE_STD_HASH
#endif
#endif // include guard

View File

@@ -28,7 +28,7 @@
#include <string>
#include <vector>
#if ! defined( BOOST_NO_CXX11_HDR_FUNCTIONAL ) && ! defined( BOOST_DYNAMIC_BITSET_NO_STD_HASH )
#if defined( BOOST_DYNAMIC_BITSET_SPECIALIZE_STD_HASH )
# include <functional>
namespace std {

View File

@@ -1761,7 +1761,7 @@ dynamic_bitset< Block, Allocator >::bit_appender::get_count() const
} // namespace boost
// std::hash support
#if ! defined( BOOST_NO_CXX11_HDR_FUNCTIONAL ) && ! defined( BOOST_DYNAMIC_BITSET_NO_STD_HASH )
#if defined( BOOST_DYNAMIC_BITSET_SPECIALIZE_STD_HASH )
namespace std {
template< typename Block, typename Allocator >
struct hash< boost::dynamic_bitset< Block, Allocator > >