s/UB/ill-formed

This commit is contained in:
joaquintides
2024-05-30 09:08:07 +02:00
parent f77bdb9b67
commit 7e9032c703
2 changed files with 3 additions and 3 deletions

View File

@ -36,9 +36,9 @@ this property is critical for the proper behavior of open-addressing hash contai
* `false` if `Hash::is_avalanching` is not present, * `false` if `Hash::is_avalanching` is not present,
* `Hash::is_avalanching::value` if this is present and convertible at compile time to a `bool`, * `Hash::is_avalanching::value` if this is present and convertible at compile time to a `bool`,
* `true` if `Hash::is_avalanching` is `void` (this usage is deprecated). * `true` if `Hash::is_avalanching` is `void` (this usage is deprecated),
* ill-formed otherwise.
The behavior is undefined if none of the three cases above is met.
Users can then declare a hash function `Hash` as avalanching either by embedding an appropriate `is_avalanching` typedef Users can then declare a hash function `Hash` as avalanching either by embedding an appropriate `is_avalanching` typedef
into the definition of `Hash`, or directly by specializing `hash_is_avalanching<Hash>` to a class with into the definition of `Hash`, or directly by specializing `hash_is_avalanching<Hash>` to a class with
an embedded compile-time constant `value` set to `true`. an embedded compile-time constant `value` set to `true`.

View File

@ -53,7 +53,7 @@ struct hash_is_avalanching_impl<
* - Hash::is_avalanching::value if this is present and constexpr-convertible * - Hash::is_avalanching::value if this is present and constexpr-convertible
* to a bool. * to a bool.
* - true if Hash::is_avalanching is void (deprecated). * - true if Hash::is_avalanching is void (deprecated).
* UB otherwise. * - ill-formed otherwise.
*/ */
template<typename Hash> template<typename Hash>
struct hash_is_avalanching: detail::hash_is_avalanching_impl<Hash>::type{}; struct hash_is_avalanching: detail::hash_is_avalanching_impl<Hash>::type{};