|
Boost Users : |
Subject: Re: [Boost-users] What concepts/interface must the element type of multi_index_container<> support?
From: Chris Cleeland (chris.cleeland_at_[hidden])
Date: 2011-09-19 09:56:04
Joaquin,
Thank you very much for the very clear explanation. I sort of figured
things out late Friday, but left the question "out there" in the hopes
that I would get a more authoritative answer/explanation; my
"solution", while it worked, felt clumsy, so I figured there had to be
a better way that I was missing.
I believe what I had missed understanding the first time through were
the default values for Hash and Pred
On Mon, Sep 19, 2011 at 1:06 AM, <joaquin_at_[hidden]> wrote:
> The specification of
> a unique
> hashed index goes like (http://tinyurl.com/3n67upt )
>
> hashed_unique<
> KeyFromValue,
> Hash=boost::hash<KeyFromValue::result_type>,
> Pred=std::equal_to<KeyFromValue::result_type>
>>
>
And *this* was a big thing that I missed:
> Furthermore, Hash must return a std::size_t.
and the compiler's error messages were very misleading with respect to
what was wrong.
I will review what I hacked in and re-evaluate based on the knowledge
from your reply.
Cheers!
-cj
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net