Hi,
I am trying to do the following:
#include <string>#include
I should point out that there is a copy paste error in the code I sent:
boost::fusion::get<0>(b);
Regards
Daniel Bradburn
2011/10/25 Daniel Bradburn
Hi,
I am trying to do the following:
#include <string>#include
#include #include int main(int argc, char* argv[]) { typedef boost::fusion::tuple<int> T1; typedef boost::fusion::result_of::push_back ::type T2; T1 a(0); T2 b(boost::fusion::push_back(a, std::string("")));
boost::fusion::get<0>();
T1 c(boost::fusion::pop_back(b));
return 0;
}
However I get the following compilation errors:
error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
error C2868: 'boost::lazy_disable_if_c::type' : illegal syntax for using-declaration; expected qualified-name
error C2602: 'boost::lazy_disable_if_c::type' is not a member of a base class of 'boost::lazy_disable_if_c'
error C2504: 'boost::fusion::extension::at_impl<Tag>::apply
' : base class undefined error C2504: 'boost::fusion::extension::at_impl<Tag>::apply
' : base class undefined error C2146: syntax error : missing ';' before identifier 'type'
error C2039: 'type' : is not a member of 'boost::fusion::result_of::at_c
' error C2664: 'boost::fusion::tuple<T0>::tuple(const boost::fusion::tuple<T0> &)' : cannot convert parameter 1 from 'boost::fusion::iterator_range' to 'const boost::fusion::tuple<T0> &'
error C2146: syntax error : missing ',' before identifier 'type'
error C2065: 'type' : undeclared identifier
error C2039: 'type' : is not a member of 'boost::fusion::result_of::prior<Iterator>'
Having read the topic here : http://lists.boost.org/Archives/boost/2011/08/184624.php it looks like this is partly due to a bug in the pop_back implementation. Is there a fix for this?
However I would like to know if it is also possible to use boost::fusion::get on the result of push_back?
Best regards
Daniel Bradburn
Daniel Bradburn
Hi,
I am trying to do the following:
#include <string>#include
#include #include int main(int argc, char* argv[]) { typedef boost::fusion::tuple<int> T1; typedef boost::fusion::result_of::push_back ::type T2; T1 a(0); T2 b(boost::fusion::push_back(a, std::string("")));
boost::fusion::get<0>();
fusion::joint_view, which is returned by fusion::push_back, does not implement the random access concept. Use fusion::front or fusion::deref x fusion::begin.
T1 c(boost::fusion::pop_back(b));
fusion::pop_back requires the sequence to be bidirectional. fusion::joint_view isn't.
return 0;
}
[...] Christopher
participants (2)
-
Christopher Schmidt
-
Daniel Bradburn