Boost logo

Boost Users :

Subject: Re: [Boost-users] [Phoenix] : Using phoenix with zip_iterator
From: Manjunath Kudlur (keveman_at_[hidden])
Date: 2010-03-16 13:00:48


>
> Try a1.template get<0>();

I tried this, and get the following error :

/usr/lib/gcc/i386-redhat-linux/4.3.2/../../../../include/c++/4.3.2/bits/stl_algo.h:
In function ‘_Funct std::for_each(_IIter, _IIter, _Funct) [with _IIter
= boost::zip_iterator<boost::tuples::tuple<__gnu_cxx::__normal_iterator<int*,
std::vector<int, std::allocator<int> > >,
__gnu_cxx::__normal_iterator<int*, std::vector<int,
std::allocator<int> > >, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type> >, _Funct =
boost::phoenix::actor<boost::phoenix::composite<boost::phoenix::shift_left_eval,
boost::fusion::vector<boost::phoenix::reference<std::basic_ostream<char,
std::char_traits<char> > >,
boost::phoenix::composite<boost::phoenix::detail::function_eval<1>,
boost::fusion::vector<boost::phoenix::value<get0_>,
boost::phoenix::argument<0>, boost::fusion::void_,
boost::fusion::void_, boost::fusion::void_, boost::fusion::void_,
boost::fusion::void_, boost::fusion::void_, boost::fusion::void_,
boost::fusion::void_> >, boost::fusion::void_, boost::fusion::void_,
boost::fusion::void_, boost::fusion::void_, boost::fusion::void_,
boost::fusion::void_, boost::fusion::void_, boost::fusion::void_> >
>]’:
zip.cpp:54: instantiated from here
/usr/lib/gcc/i386-redhat-linux/4.3.2/../../../../include/c++/4.3.2/bits/stl_algo.h:3791:
error: no match for call to
‘(boost::phoenix::actor<boost::phoenix::composite<boost::phoenix::shift_left_eval,
boost::fusion::vector<boost::phoenix::reference<std::basic_ostream<char,
std::char_traits<char> > >,
boost::phoenix::composite<boost::phoenix::detail::function_eval<1>,
boost::fusion::vector<boost::phoenix::value<get0_>,
boost::phoenix::argument<0>, boost::fusion::void_,
boost::fusion::void_, boost::fusion::void_, boost::fusion::void_,
boost::fusion::void_, boost::fusion::void_, boost::fusion::void_,
boost::fusion::void_> >, boost::fusion::void_, boost::fusion::void_,
boost::fusion::void_, boost::fusion::void_, boost::fusion::void_,
boost::fusion::void_, boost::fusion::void_, boost::fusion::void_> > >)
(boost::tuples::cons<int&, boost::tuples::cons<int&,
boost::tuples::null_type> >)’
/x/mkudlur/boost/boost-trunk/boost/spirit/home/phoenix/core/actor.hpp:90:
note: candidates are: typename boost::mpl::eval_if<typename
Eval::no_nullary,
boost::mpl::identity<boost::phoenix::detail::error_expecting_arguments>,
boost::phoenix::eval_result<Eval,
boost::phoenix::basic_environment<boost::fusion::void_,
boost::fusion::void_, boost::fusion::void_, boost::fusion::void_,
boost::fusion::void_, boost::fusion::void_, boost::fusion::void_,
boost::fusion::void_, boost::fusion::void_, boost::fusion::void_> >
>::type boost::phoenix::actor<Eval>::operator()() const [with Eval =
boost::phoenix::composite<boost::phoenix::shift_left_eval,
boost::fusion::vector<boost::phoenix::reference<std::basic_ostream<char,
std::char_traits<char> > >,
boost::phoenix::composite<boost::phoenix::detail::function_eval<1>,
boost::fusion::vector<boost::phoenix::value<get0_>,
boost::phoenix::argument<0>, boost::fusion::void_,
boost::fusion::void_, boost::fusion::void_, boost::fusion::void_,
boost::fusion::void_, boost::fusion::void_, boost::fusion::void_,
boost::fusion::void_> >, boost::fusion::void_, boost::fusion::void_,
boost::fusion::void_, boost::fusion::void_, boost::fusion::void_,
boost::fusion::void_, boost::fusion::void_, boost::fusion::void_> >]
/x/mkudlur/boost/boost-trunk/boost/spirit/home/phoenix/core/actor.hpp:107:
note: typename
boost::phoenix::actor<Eval>::result<boost::phoenix::actor<Eval>
()(T0&)>::type boost::phoenix::actor<Eval>::operator()(T0&) const
[with T0 = boost::tuples::cons<int&, boost::tuples::cons<int&,
boost::tuples::null_type> >, Eval =
boost::phoenix::composite<boost::phoenix::shift_left_eval,
boost::fusion::vector<boost::phoenix::reference<std::basic_ostream<char,
std::char_traits<char> > >,
boost::phoenix::composite<boost::phoenix::detail::function_eval<1>,
boost::fusion::vector<boost::phoenix::value<get0_>,
boost::phoenix::argument<0>, boost::fusion::void_,
boost::fusion::void_, boost::fusion::void_, boost::fusion::void_,
boost::fusion::void_, boost::fusion::void_, boost::fusion::void_,
boost::fusion::void_> >, boost::fusion::void_, boost::fusion::void_,
boost::fusion::void_, boost::fusion::void_, boost::fusion::void_,
boost::fusion::void_, boost::fusion::void_, boost::fusion::void_> >]

This is with g++ 4.3.2 on Fedora 10. So is this a bug? Can someone
suggest a workaround to get it working?

Thanks,
Manjunath


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net