-
Notifications
You must be signed in to change notification settings - Fork 58
Feature/hash_is_avalanching #40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/hash_is_avalanching #40
Conversation
test/hash_is_avalanching_test.cpp
Outdated
| BOOST_TEST_TRAIT_FALSE(( hash_is_avalanching< boost::hash<std::basic_string<my_char> > > )); | ||
| #endif | ||
|
|
||
| BOOST_TEST_TRAIT_FALSE(( hash_is_avalanching< std::hash<std::string > > )); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are you testing this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's an example of a struct without a nested is_avalanching.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use a struct without a nested is_avalanching, then.
I don't want to guarantee that hash_is_avalanching is false for std::hash<std::string>.
test/hash_is_avalanching_test.cpp
Outdated
| BOOST_TEST_TRAIT_FALSE(( hash_is_avalanching< std::hash<std::string > > )); | ||
| BOOST_TEST_TRAIT_TRUE(( hash_is_avalanching< X > )); | ||
| BOOST_TEST_TRAIT_TRUE(( hash_is_avalanching< Y > )); | ||
| BOOST_TEST_TRAIT_FALSE(( hash_is_avalanching< Z > )); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's put these three in their own test (plus one without is_avalanching) and leave this one alone.
|
Looks almost good to go. You just need to remove one include to make the cmake tests pass. |
|
I wonder whether
|
This is part 1 of the process of migrating
hash_is_avalanchingfrom Boost.Unordered to Boost.ContainerHash; part 2 will redefineboost::unordered::hash_is_avalanchingas a using declaration ofboost::container_hash::hash_is_avalanchingand deprecate<boost/unordered/hash_traits.hpp>.