// Copyright 2022 Peter Dimov // Distributed under the Boost Software License, Version 1.0. // https://www.boost.org/LICENSE_1_0.txt // an imitation of a third-party header specializing hash_is_avalanching // (boost/container_hash/hash.hpp is an example doing that) #include struct X3 { }; namespace boost { namespace unordered { template struct hash_is_avalanching; template<> struct hash_is_avalanching< ::X3 >: boost::true_type {}; } // namespace unordered } // namespace boost // #include #include struct X1 { }; struct X2 { typedef void is_avalanching; }; int main() { using boost::unordered::hash_is_avalanching; BOOST_TEST_TRAIT_FALSE((hash_is_avalanching)); BOOST_TEST_TRAIT_TRUE((hash_is_avalanching)); BOOST_TEST_TRAIT_TRUE((hash_is_avalanching)); return boost::report_errors(); }