Boost logo

Boost Users :

Subject: Re: [Boost-users] [phoenix] v3 extension mechanism for template functions
From: alfC (alfredo.correa_at_[hidden])
Date: 2011-04-20 04:12:34

On Apr 19, 11:58 pm, alfC <alfredo.cor..._at_[hidden]> wrote:
> makes sense. Following your steps and the code base in
>  boost/phoenix/fusion/at.hpp and boost/proto/functional/fusion/at.hpp
> I was able to add the pow<N>(...) expression (which works for
> boost.units, and doubles), see below.

BTW, using (note the actor<...> pattern (see below) nicely lifts an
ambiguity between boost::units::pow and the newly created
I hope the boost.units maintainers take now and include an adaptor
like this to boost/units/phoenix.hpp

                template<long N, typename Arg>
                typename expression::pow<mpl::int_<N>, actor<Arg> >::type const
                pow(actor<Arg> const& arg){
                        return expression::pow<mpl::int_<N>, actor<Arg>
>::make(mpl::int_<N>(), arg);


Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at