
Andreas Huber <ahd6974-spamgroupstrap@yahoo.com> writes:
David Abrahams <dave <at> boost-consulting.com> writes:
If you're reversing the sequence, all your arguments about requiring mutability for efficiency reasons are invalid. You might as well do
I don't think so, I'm only reversing the sequence *after* performing other mutating operations on it. Here's an example from the current implementation (context_type_list is assembled from multiple InnerInitial lists):
template< class CommonContext, class DestinationState > struct make_context_list { typedef typename mpl::reverse< typename mpl::push_front< typename mpl::erase< typename DestinationState::context_type_list, typename mpl::find< typename DestinationState::context_type_list, CommonContext >::type, typename mpl::end< typename DestinationState::context_type_list >::type >::type, DestinationState
::type >::type type; };
[I know that this code needs improvement]
If you're erasing items at the end of a list<>, that's *very* expensive! So, sorry to be blunt, but I maintain your arguments about efficiency are invalid. Not to mention that they're not backed up by measurements. -- Dave Abrahams Boost Consulting www.boost-consulting.com