|
Boost Users : |
Subject: [Boost-users] [Proto] Building a mpl::vector from an expression
From: christophe henry (henry_christophe_at_[hidden])
Date: 2009-08-18 15:32:53
Hi,
I am trying to build a mpl::vector from an expression like
(string(),ClassA(),ClassB())
To get a mpl::vector<string,ClassA,ClassB>
With string, ClassA and ClassB being not enough under control to protoify them with a proto::extends.
I naively tried the following grammar
struct BuildFlags
: proto::or_<
proto::when <
proto::terminal<proto::_>,
boost::mpl::vector<proto::_child>()
>,
proto::when <
proto::comma<BuildFlags,BuildFlags >,
boost::mpl::push_back<
BuildFlags(proto::_left),proto::_right>()
>
>
{};
Or some typeof variants of it, with no more success and I start wondering if I got on a rocky way leading me to unavoidable doom.
Is there a way to do this or I should give up the idea?
Thanks,
Christophe
_________________________________________________________________
Share your memories online with anyone you want.
http://www.microsoft.com/middleeast/windows/windowslive/products/photos-share.aspx?tab=1
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