|
Boost Users : |
Subject: Re: [Boost-users] [Fusion] functor fused and unfused at the same time
From: alfC (alfredo.correa_at_[hidden])
Date: 2010-11-09 09:03:36
> I then tried this
>
> struct F_impl{
> typedef result_of::make_map<
> p , q ,
> double, double
> >::type mapped_arguments;
> template<class Args> struct result{ typedef double type; };
> double operator()(mapped_arguments const& args) const{
> return at_key<p>(args) + at_key<q>(args);
> }
>
> };
>
> struct F : F_impl, unfused<F_impl const&>{
> F() : unfused<F_impl const&>((F_impl const&)*this){}
> F(F_impl const& f) : F_impl(f), unfused<F_impl const&>((F_impl
> const&)*this){}
> template<class Args> struct result{ typedef typename
> F_impl::result<Args>::type type; };
> using F_impl::operator();
>
> };
>
> which seems to work but looks and feels awkward.
Sorry, take that back this second option doesn't work either.
(So, I don't have a single solution for this).
Thank you,
Alfredo
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