Boost logo

Boost :

From: Dave Harris (brangdon_at_[hidden])
Date: 2005-03-21 22:35:15

In-Reply-To: <d1mq8d$b5q$1_at_[hidden]>
nesotto_at_[hidden] (Thorsten Ottosen) wrote (abridged):
> 7. the hash_ptr<> suggestion is better done with general indirected
> function

Did I miss where this was discussed? To recap, we were talking about
adding something like:

    template<typename T>
    struct hash_ptr {
        size_t operator()(const T *p) const {
            return hash_value( *p );
    template<typename T>
    struct equal_ptr {
        bool operator()( const T *a, const T *b ) const {
            return *a == *b;

to the hash library for use as, eg:

   unordered_set< MyType *, hash_ptr<MyType>, equal_ptr<MyType> >

What do you mean by using a "general indirected function" instead?

-- Dave Harris, Nottingham, UK

Boost list run by bdawes at, gregod at, cpdaniel at, john at