
Hi, I am trying to do the following: #include <string>#include <boost/fusion/tuple.hpp>#include <boost/fusion/include/push_back.hpp>#include <boost/fusion/include/pop_back.hpp> int main(int argc, char* argv[]) { typedef boost::fusion::tuple<int> T1; typedef boost::fusion::result_of::push_back<const T1, std::string>::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<B,T>::type' : illegal syntax for using-declaration; expected qualified-name error C2602: 'boost::lazy_disable_if_c<B,T>::type' is not a member of a base class of 'boost::lazy_disable_if_c<B,T>' error C2504: 'boost::fusion::extension::at_impl<Tag>::apply<Sequence,N>' : base class undefined error C2504: 'boost::fusion::extension::at_impl<Tag>::apply<Sequence,N>' : 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<Sequence,N>' 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

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 <moagstar@gmail.com>
Hi,
I am trying to do the following:
#include <string>#include <boost/fusion/tuple.hpp>#include <boost/fusion/include/push_back.hpp>#include <boost/fusion/include/pop_back.hpp> int main(int argc, char* argv[]) { typedef boost::fusion::tuple<int> T1; typedef boost::fusion::result_of::push_back<const T1, std::string>::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<B,T>::type' : illegal syntax for using-declaration; expected qualified-name
error C2602: 'boost::lazy_disable_if_c<B,T>::type' is not a member of a base class of 'boost::lazy_disable_if_c<B,T>'
error C2504: 'boost::fusion::extension::at_impl<Tag>::apply<Sequence,N>' : base class undefined
error C2504: 'boost::fusion::extension::at_impl<Tag>::apply<Sequence,N>' : 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<Sequence,N>'
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 <moagstar@gmail.com> writes:
Hi,
I am trying to do the following:
#include <string>#include <boost/fusion/tuple.hpp>#include <boost/fusion/include/push_back.hpp>#include <boost/fusion/include/pop_back.hpp> int main(int argc, char* argv[]) { typedef boost::fusion::tuple<int> T1; typedef boost::fusion::result_of::push_back<const T1, std::string>::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