
On Thu, Feb 12, 2009 at 10:12 AM, Stjepan Rajko <stjepan.rajko@gmail.com> wrote:
I was able to get the fusion-adapted boost::array to be a conforming mpl sequence by adding:
namespace boost { namespace mpl {
template<typename T, std::size_t N> struct tag<boost::array<T,N> > { typedef boost::fusion::fusion_sequence_tag type; };
template<typename T, std::size_t N> struct sequence_tag<boost::array<T,N> > { typedef boost::fusion::fusion_sequence_tag type; };
}}
Furthermore, I am able to execute a transform on the array after adding this: http://pastebin.com/f40b33e1d This works perfectly, that is, minus the fact that adding it in gives me some really bizarre compilation errors (gcc 4.0.1, darwin): /Development/boost/boost/fusion/adapted/array/array_iterator.hpp: In instantiation of 'boost::fusion::array_iterator<boost::array<ame::patterns::normal_model_state, 12ul>, 0>': ... /Development/boost/boost/fusion/adapted/array/array_iterator.hpp:29: error: 'boost::array<ame::patterns::normal_model_state, 12ul>::<anonymous enum>' is/uses anonymous type /Development/boost/boost/fusion/adapted/array/array_iterator.hpp:29: error: trying to instantiate 'template<class Seq1, class Seq2> struct boost::fusion::detail::enable_comparison' The offending line in array_iterator is: BOOST_MPL_ASSERT_RELATION(Pos, <=, Array::static_size); Commenting out that line results in a successful compile, and the program runs as expected. I would really appreciate it if someone could help me out here, I am in total dark as to why the BOOST_MPL_ASSERT_RELATION is not working correctly, and what fusion::detail::enable_comparison has to do with anything. TIA, Stjepan