1 #ifndef BOOST_SMART_PTR_OWNER_HASH_HPP_INCLUDED 2 #define BOOST_SMART_PTR_OWNER_HASH_HPP_INCLUDED 3 4 // Copyright 2020 Peter Dimov 5 // Distributed under the Boost Software License, Version 1.0. 6 // https://www.boost.org/LICENSE_1_0.txt 7 8 #include <boost/config.hpp> 9 #include <cstddef> 10 11 namespace boost 12 { 13 14 template<class T> struct owner_hash 15 { 16 typedef std::size_t result_type; 17 typedef T argument_type; 18 operator ()boost::owner_hash19 std::size_t operator()( T const & t ) const BOOST_NOEXCEPT 20 { 21 return t.owner_hash_value(); 22 } 23 }; 24 25 } // namespace boost 26 27 #endif // #ifndef BOOST_SMART_PTR_OWNER_HASH_HPP_INCLUDED 28