mirror of
https://github.com/boostorg/container_hash.git
synced 2025-08-02 14:04:35 +02:00
Update documentation
This commit is contained in:
@@ -55,6 +55,22 @@ to be templates constrained on e.g. `std::is_integral` or its moral
|
|||||||
equivalent. This causes types convertible to an integral to no longer
|
equivalent. This causes types convertible to an integral to no longer
|
||||||
match, avoiding the problem.
|
match, avoiding the problem.
|
||||||
|
|
||||||
|
== Hash Value Stability
|
||||||
|
|
||||||
|
In general, the library does not promise that the hash values will stay
|
||||||
|
the same from release to release (otherwise improvements would be
|
||||||
|
impossible). However, historically values have been quite stable. Before
|
||||||
|
release 1.81, the previous changes have been in 1.56 (a better
|
||||||
|
`hash_combine`) and 1.78 (macOS-specific change to `hash_combine`.)
|
||||||
|
|
||||||
|
Code should generally not depend on specific hash values, but for those
|
||||||
|
willing to take the risk of occasional breaks due to hash value changes,
|
||||||
|
the library now has a test that checks hash values for a number of types
|
||||||
|
against reference values (`test/hash_reference_values.cpp`),
|
||||||
|
whose https://github.com/boostorg/container_hash/commits/develop/test/hash_reference_values.cpp[version history]
|
||||||
|
can be used as a rough guide to when hash values have changed, and for what
|
||||||
|
types.
|
||||||
|
|
||||||
== hash_combine
|
== hash_combine
|
||||||
|
|
||||||
The initial implementation of the library was based on Issue 6.18 of the
|
The initial implementation of the library was based on Issue 6.18 of the
|
||||||
|
@@ -14,8 +14,10 @@ https://www.boost.org/LICENSE_1_0.txt
|
|||||||
* Added `is_tuple_like` and an overload of `hash_value` for
|
* Added `is_tuple_like` and an overload of `hash_value` for
|
||||||
tuple-like types.
|
tuple-like types.
|
||||||
* Changed string hashing to use
|
* Changed string hashing to use
|
||||||
https://github.com/pdimov/mulxp_hash[`mulxp1_hash`]. This
|
https://github.com/pdimov/mulxp_hash[`mulxp1_hash`],
|
||||||
improves both quality and speed.
|
improving both quality and speed. This changes the hash values
|
||||||
|
for string-like types (ranges of `char`, `signed char`,
|
||||||
|
`unsigned char`, `std::byte`, `char8_t`).
|
||||||
|
|
||||||
== Boost 1.81.0
|
== Boost 1.81.0
|
||||||
|
|
||||||
@@ -33,9 +35,18 @@ Major update.
|
|||||||
* Described structs and classes (those annotated with
|
* Described structs and classes (those annotated with
|
||||||
`BOOST_DESCRIBE_STRUCT` or `BOOST_DESCRIBE_CLASS`) are now
|
`BOOST_DESCRIBE_STRUCT` or `BOOST_DESCRIBE_CLASS`) are now
|
||||||
supported out of the box.
|
supported out of the box.
|
||||||
* `hash_combine` has been improved.
|
* `hash_combine` has been improved. This changes the hash values
|
||||||
|
of composite (container and tuple) types and of scalar types
|
||||||
|
bigger than `size_t`.
|
||||||
* The performance (and quality, as a result of the above change)
|
* The performance (and quality, as a result of the above change)
|
||||||
of string hashing has been improved. `boost::hash` for strings
|
of string hashing has been improved. `boost::hash` for strings
|
||||||
now passes SMHasher in 64 bit mode.
|
now passes SMHasher in 64 bit mode.
|
||||||
* The documentation has been substantially revised to reflect
|
* The documentation has been substantially revised to reflect
|
||||||
the changes.
|
the changes.
|
||||||
|
|
||||||
|
== Boost 1.78.0
|
||||||
|
|
||||||
|
* Fixed `hash_combine` so that its behavior no longer depends
|
||||||
|
on whether `size_t` is the exact same type as `boost::uint64_t`
|
||||||
|
(which wasn't the case on macOS). This changes the hash values
|
||||||
|
of composite (container and tuple) types on macOS.
|
||||||
|
Reference in New Issue
Block a user