// Copyright 2017-2018 Daniel James. // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #include #include #include #include #include #if BOOST_UNORDERED_TEMPLATE_DEDUCTION_GUIDES #include #include #include struct hash_equals { template bool operator()(T const& x) const { boost::hash hf; return hf(x); } template bool operator()(T const& x, T const& y) const { std::equal_to eq; return eq(x, y); } }; template struct test_allocator { typedef T value_type; test_allocator() = default; template test_allocator(test_allocator const&) {} T* allocate(std::size_t n) const { return (T*)(::operator new(sizeof(T) * n)); } void deallocate(T* ptr, std::size_t) const { ::operator delete(ptr); } bool operator==(test_allocator const&) const { return true; } bool operator!=(test_allocator const&) const { return false; } }; template