Document our support for std::hash

This commit is contained in:
Gennaro Prota
2025-08-28 18:41:51 +02:00
parent 7f4078b1a9
commit f429a0a50d
2 changed files with 15 additions and 1 deletions

View File

@@ -1515,5 +1515,20 @@ from_block_range( BlockIterator first, BlockIterator last, dynamic_bitset< Block
}
#if ! defined( BOOST_NO_CXX11_HDR_FUNCTIONAL ) && ! defined( BOOST_DYNAMIC_BITSET_NO_STD_HASH )
# include <functional>
namespace std {
//! Support for std::hash.
//!
//! You can exclude this support by defining the macro
//! `BOOST_DYNAMIC_BITSET_NO_STD_HASH`.
// -----------------------------------------------------------------------
template< typename Block, typename Allocator >
struct hash< boost::dynamic_bitset< Block, Allocator > >;
}
#endif
#include "boost/dynamic_bitset/impl/dynamic_bitset.ipp"
#endif // include guard

View File

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