diff options
Diffstat (limited to '3rdParty/Boost/src/boost/smart_ptr/shared_ptr.hpp')
-rw-r--r-- | 3rdParty/Boost/src/boost/smart_ptr/shared_ptr.hpp | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/3rdParty/Boost/src/boost/smart_ptr/shared_ptr.hpp b/3rdParty/Boost/src/boost/smart_ptr/shared_ptr.hpp index 609cce9..100f1a8 100644 --- a/3rdParty/Boost/src/boost/smart_ptr/shared_ptr.hpp +++ b/3rdParty/Boost/src/boost/smart_ptr/shared_ptr.hpp @@ -41,6 +41,7 @@ #include <algorithm> // for std::swap #include <functional> // for std::less #include <typeinfo> // for std::bad_cast +#include <cstddef> // for std::size_t #if !defined(BOOST_NO_IOSTREAM) #if !defined(BOOST_NO_IOSFWD) @@ -50,11 +51,6 @@ #endif #endif -#ifdef BOOST_MSVC // moved here to work around VC++ compiler crash -# pragma warning(push) -# pragma warning(disable:4284) // odd return type for operator-> -#endif - namespace boost { @@ -688,13 +684,18 @@ template<class T> inline bool atomic_compare_exchange_explicit( shared_ptr<T> * return atomic_compare_exchange( p, v, w ); // std::move( w ) } -#endif +#endif // !defined(BOOST_SP_NO_ATOMIC_ACCESS) -} // namespace boost +// hash_value -#ifdef BOOST_MSVC -# pragma warning(pop) -#endif +template< class T > struct hash; + +template< class T > std::size_t hash_value( boost::shared_ptr<T> const & p ) +{ + return boost::hash< T* >()( p.get() ); +} + +} // namespace boost #endif // #if defined(BOOST_NO_MEMBER_TEMPLATES) && !defined(BOOST_MSVC6_MEMBER_TEMPLATES) |