SOLVED!
boost::fusion::result_of::as_vector solved my problem.
Thanks.
Hello Boost Users,
I've encountered a trouble using fusion adapted struct as mpl sequence:
when I call mpl::push_front with fusion::vector it works but if I try to call it with
adapted struct, it fails. Do I miss something? Is there any concise solution or
I have to convert it by hand?
source:
http://pastebin.com/3ELipu1M
#include <string> #include <boost/fusion/adapted/struct/adapt_struct.hpp> #include <boost/fusion/mpl.hpp> #include <boost/fusion/container/vector.hpp> #include <boost/mpl/push_front.hpp> typedef boost::fusion::vector<std::string, int> employee_1; struct employee_2 { std::string name; int age; }; BOOST_FUSION_ADAPT_STRUCT( employee_2, (std::string, name) (int, age)) /* this line compiles just fine */ typedef boost::mpl::push_front<employee_1, bool>::type bool_employee_1; /* this fails */ typedef boost::mpl::push_front<employee_2, bool>::type bool_employee_2; int main() { return 0; }
Thanks!