Re: [Boost-users] [Proto] Building a mpl::vector from an expression
Hi Eric,
You could use reverse_fold instead of reversing the whole list after the transform. Or you could use reverse_fold_tree to get the vector and then pop the attribute_ off the front. That's probably fastest and simplest.
I must be doing something wrong (I suppose it has something to do with my second "when") because parsing:
attributes_ << int() << bool() << string()
With the above given grammar gives me a mpl::vector
christophe henry wrote:
Hi Eric,
You could use reverse_fold instead of reversing the whole list after the transform. Or you could use reverse_fold_tree to get the vector and then pop the attribute_ off the front. That's probably fastest and simplest.
I must be doing something wrong (I suppose it has something to do with my second "when") because parsing: attributes_ << int() << bool() << string()
With the above given grammar gives me a mpl::vector
, which is normal, but if I simply and naively replace fold by reverse_fold, all I get is a mpl::vector<int>. Am I missing something obvious?
Please see below:
#include <string>
#include
participants (2)
-
christophe henry
-
Eric Niebler