Boost logo

Boost Users :

Subject: Re: [Boost-users] [Phoenix] : Using phoenix with zip_iterator
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2010-03-16 10:32:58


AMDG

Manjunath Kudlur wrote:
> Here is the compiler error :
> zip.cpp: In member function ‘int get0_::operator()(Arg) const’:
> zip.cpp:33: error: expected primary-expression before ‘)’ token
>
> struct get0_ {
> template<typename Arg>
> struct result {
> typedef int type;
> };
>
> template<typename Arg>
> int operator()(Arg a1) const {
> return a1.get<0>();
> }
> };

Try a1.template get<0>();

> zip.cpp:51: instantiated from here
> /usr/include/c++/4.4/bits/stl_algo.h:4200: 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::tuples::cons<int&, boost::tuples::cons<int&,
> boost::tuples::null_type> >)’

Grrr. Phoenix doesn't support perfect forwarding.

In Christ,
Steven Watanabe


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