|
Boost : |
Subject: Re: [boost] [Hana] Announcing Hana's formal review next week (June 10th)
From: Louis Dionne (ldionne.2_at_[hidden])
Date: 2015-06-13 16:24:51
Paul Fultz II <pfultz2 <at> yahoo.com> writes:
>
> > The problem with this approach is that equality of keys can't be more
> general
> > than type identity.
>
> Instead a special "hash"-like function could be provided that would
> transform
> the keys to a type where identity could be used. This might be faster than
> using linear/binary search, since the the compiler can do the lookup based
> on identity.
I have thought about that already, but how would you define such a hash
function for _heterogeneous_ objects? I just don't know how that can be
done, but it is not a bad idea.
Still, I think a good compile-time performance is achievable without a
hash function, by simply avoiding the short-circuiting in the `contains`
function.
Regards,
Louis
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk