On 11/08/10 13:30, Christopher Schmidt wrote:
Larry Evans schrieb:
On 11/08/10 06:55, Larry Evans wrote: [snip] [snip]
BTW, just read:
http://www.boost.org/doc/libs/1_44_0/libs/fusion/doc/html /fusion/notes.html#fusion.notes.overloaded_functions
which says:
There is an overloaded function, f(k), for each key type k. The compiler chooses the appropriate function given a key, k.
which is exactly the method used in named_component_ctor.cpp, where the overloaded function is arg.
It's not obvious to me, after looking at:
key_of_impl.hpp value_of_impl.hpp
in boost/fusion/container/map/detail where this overloaded function, f, is located. (Of course I assume it's not named f, but something like value_of...). Could someone point it out?
Larry,
thanks for your work!
I am responsible for that change. The old implementation, that is the implementation up to revision 40392, did lookup values by key type via one single overloaded function:
https://svn.boost.org/trac/boost/browser/trunk/boost/fusion/container/map/de... https://svn.boost.org/trac/boost/browser/trunk/boost/fusion/container/map/de...
I ditched that when I merged associative iterators from my port back to the trunk. I did some benchmarking back then. IIRC, overloaded value lookup did worse than the unrolled value lookup. Here is the original post:
[snip] The attached looks like a pretty simple map implementation and may be worth considering. Of course it only works with a variadic template compiler. -regards, Larry