|
Boost Users : |
Subject: [Boost-users] [Fusion] Runtime complexity of boost::fusion::find?
From: Clinton Mead (clintonmead_at_[hidden])
Date: 2010-12-09 23:12:01
Hi everyone
On the following documentation page:
http://www.boost.org/doc/libs/1_45_0/libs/fusion/doc/html/fusion/algorithm/query/functions/find.html
It mentions that the computational complexity for "find" is linear. However,
I can not understand how this is the case.
As far as I understand all find needs to do is to look through types, simply
iterating through the sequence types at compile time using
result_of::next<X>::type where where X is initially
result_of::begin<SEQ>::type. So I can't see how any actual work is done by
find.
Am I missing something here? I'm working on a parameter library, and I
assumed things like "find" used constant or no time to execute. Could people
please explain how find could use linear time?
Thanks
Clinton
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