Boost logo

Boost Users :

Subject: Re: [Boost-users] [fusion] named parameter technique with fusion::map
From: Larry Evans (cppljevans_at_[hidden])
Date: 2010-11-08 07:55:49


On 11/07/10 23:33, Larry Evans wrote:
[snip]
> The attached produces output:
>
[snip]
> -------------------------------
> named/default values for tuple:
> -------------------------------
> at1=ti<1>(1)
> at2=ti<2>(2)
> at3=ti<3>(-1)
> ================================
>
> The args to pairs_nam_ti1_3_t CTOR could be the
[snip]
Unfortunately, reversing args to airs_nam_ti1_3_t CTOR,
as in:

      pairs_nam_ti1_3_t
    pairs_nam_ti1_3_v
    ( fusion::pair<mpl::int_<2>,ti<2> >(2)
    , fusion::pair<mpl::int_<1>,ti<1> >(1)
    )

causes compile error about "no matching function".

Investigating.

-Larry

BTW, just read:

  http://www.boost.org/doc/libs/1_44_0/libs/fusion/doc/html
    /fusion/notes.html#fusion.notes.overloaded_functions

which says:

  There is an overloaded function, f(k), for each key type k.
  The compiler chooses the appropriate function given a key, k.

which is exactly the method used in named_component_ctor.cpp,
where the overloaded function is arg.


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