10 Jan
2015
10 Jan
'15
2:39 a.m.
Andrzej Krzemienski wrote:
Is there any recommended way to avoid the functional dependency?
A good question. For the same reason I am reluctant to implement hash support in Boost.Optional.
Optional is easier because you can forward-declare just hash<> and then return empty()? 0: hash<T>()( t_ ). Like shared_ptr.hpp does: // hash_value template< class T > struct hash; template< class T > std::size_t hash_value( boost::shared_ptr<T> const & p ) BOOST_NOEXCEPT { return boost::hash< T* >()( p.get() ); }