From: Thorsten Ottosen (nesotto_at_[hidden])
Date: 2005-04-11 02:07:25
"Daniel James" <daniel_at_[hidden]> wrote in message
| Peter Dimov wrote:
| > Or perhaps just switching to:
| > template<class T> size_t hash_value( T * const & p );
| > ?
| How embarrassing....I hadn't thought of that. I was trying every way I
| could think of to declare the array function. I might not be able to get
| it to work for older compilers though. But that's not such a big deal.
| I'll see how it goes.
| I still think it may be a good idea to change hash_combine's
| specification (but not necessarily it's implementation) to be in terms
| of boost::hash (or std::hash). But that's up to you.
| Thorsten wrote:
| > Does
| > template< class T >
| > void hash( size_t&, const T* );
| > template< class T, unsigned N >
| > void hash( size_t&, const T (&array)[N] );
| > not work?
| It depends on which compiler you ask, intel linux (EDG based) says no.
| (Sorry, for not replying to your mail directly, but I seem to have lost
| it, which is a bit odd since I'm using gmane).
yeah, there is a macro in boost/range/config.hpp that is more portable:
template< class T >
void foo( T BOOST_ARRAY_REF()[N] );
as a related issue, an array is a range, so why define hash_value for it?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk