I'm trying to output an adapted fusion sequence (PMT::QE::DataSetPMT::QE::Measurement) containing other adapted fusion sequences to std::cout. I had hoped for recursive behaviour, such that the contents of each sub-sequence are printed in turn. Having looked at the code in $BOOST_ROOT/boost/fusion/sequence/io/detail/out.hpp it looks like:
----
PMT::QE::DataSetPMT::QE::Measurement output;
... Fill output ...
std::cout << output << std::endl;
----
should work. Unfortunately, I'm getting compilation errors like:
no match for ‘operator<<’ in ‘os << boost::fusion::operator* [with Iterator = boost::fusion::basic_iteratorPMT::QE::Measurement, 0>](((const boost::fusion::iterator_basePMT::QE::Measurement, 0> >&)((const boost::fusion::iterator_basePMT::QE::Measurement, 0> >*)((const boost::fusion::basic_iteratorPMT::QE::Measurement, 0>*)first))))’
The other errors simply replace the index 0 with 1 and 2 (PMT::QE::DataSet has 3 elements). On the other hand, the following does work:
----
PMT::QE::DataSetPMT::QE::Measurement output;
... Fill output ...
std::cout << at_c<0>(output) << std::endl;
std::cout << at_c<1>(output) << std::endl;
std::cout << at_c<2>(output) << std::endl;
----
Is this the expected behaviour? What am I missing? Is there a way to achieve the desired recursive behaviour?
Many thanks,
Hugh