[mpl] how can I pattern-match a 'built' mpl::vector?

I have an mpl::vector that is built by a series of push_back ops, and want to traverse at runtime using mpl::for_each<v>( do_sth() ) A member type may also be an mpl::vector, and in this case I wish to specialise do_sth::operator() for that case. I'm having trouble doing that, since the result of push_back is not an mpl::vector type, so how do I go about matching this? TIA -- rob -- Rob Desbois http://theotherbranch.wordpress.com/ "I disapprove of what you say, but I’ll defend to the death your right to say it", Voltaire

On 26 March 2012 16:14, Gabriel Redner
I'm having trouble doing that, since the result of push_back is not an mpl::vector type, so how do I go about matching this?
mpl::is_sequence should allow you to detect a nested sequence.
Perfect :-) thanks Feel silly for missing that one... --rob -- Rob Desbois http://theotherbranch.wordpress.com/ "I disapprove of what you say, but I’ll defend to the death your right to say it", Voltaire
participants (2)
-
Gabriel Redner
-
Rob Desbois