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,ti<2> >(2)
, fusion::pair,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.