Boost
C++ Libraries
...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
This is an older version of Boost and was released in 2019. The current version is 1.89.0.
<boost/functional/hash/*.hpp> headers. Now a single header,
<boost/functional/hash.hpp>
is used.
BOOST_HASH_NO_EXTENSIONS
macro, which disables the extensions to TR1.
long long,
std::complex.
long double.
fpclass
which doesn't support long
double.
errno.
std::numeric_limits.
long
long and unsigned
long long.
long
double and float
as the C++ overloads aren't always availables.
boost/container_hash/detail,
since they are part of functional/hash, not container_hash. boost/container_hash/detail/container_fwd.hpp has been moved to boost/detail/container_fwd.hpp
as it's used outside of this library, the others have been moved to boost/functional/hash/detail.
BOOST_DETAIL_NO_CONTAINER_FWD
macro.
BOOST_HAS_* macros.
hash_value
by defining BOOST_HASH_NO_IMPLICIT_CASTS.
When using boost::hash for a type that does not have hash_value declared but does have an
implicit conversion to a type that does, it would use that implicit conversion
to hash it. Which can sometimes go very wrong, e.g. using a conversion
to bool and only hashing to 2 possible values. Since fixing this is a breaking
change and was only approached quite late in the release cycle with little
discussion it's opt-in for now. This, or something like it, will become
the default in a future version.
-Wconversion flag.
-Wfloat-equal
warning.
std::array and std::tuple
when available.
boost/container_hash/detail/container_fwd.hpp.
hash_value now implemented
using SFINAE to avoid implicit casts to built in types when calling it.
enum support, which
was accidentally removed in the last version.
boost::int128_type and boost::uint128_type
where available - currently only __int128
and unsigned __int128
on some versions of gcc.
hash_combine.
This changes the combine function which was previously defined in the reference
documentation.
std::wstring
when we know we have a wchar_t.
Otherwise there's a compile error as there's no overload for hashing the
characters in wide strings (#8552).
std::unary_function and std::binary_function
(#12353).
char16_t, char32_t, u16string,
u32string
container_hash.
<boost/container_hash/hash.hpp>,
<boost/container_hash/hash_fwd.hpp>, <boost/container_hash/extensions.hpp>.
std::string_view, std::error_code,
std::error_condition std::optional,
std::variant, std::monostate
where available.
vector<bool> when using libc++. Will try to introduce
a more general fix in the next release.