10 Jan
2015
10 Jan
'15
12:12 p.m.
On 9 January 2015 at 22:27, Peter Dimov <lists@pdimov.com> wrote:
Daniel James wrote:
My preference is to use something like: 'boost::hash<T> hasher; return hasher(x.native())'.
That's what I do in shared_ptr, but in path's case, I don't believe that it can be done. hash_value( path ) does not depend on a template parameter, so the definition of hash<string> must be visible (on compilers that implement two-phase lookup properly).
Then it'd probably be better to have forwarding headers for support of each standard header, e.g. <boost/fwd/hash_string.hpp> if it's going to be in a 'fwd' module.