Boost logo

Boost Users :

Subject: [Boost-users] [boost] compose ArgumentPacks using a comma
From: er (erwann.rogard_at_[hidden])
Date: 2009-03-01 01:19:25


Hi All,

I have a structure containing a fusion sequence which is constructed
recursively.

BOOST_PARAMETER_KEYWORD(tag,kwd_struct)

// This element depends on others, hence fetches the structure
elem_x(const Args& args){ ...args[kwd_struct]...; }

structure(Args const& args)
:elements_(
   make_elements(
     ((kwd_struct = (*this)),args)
   )
)
{};

error: in constructor elem_x(const Args&) [with Args = ...]
no match for operator[] in args[kwd_struct]

If I reverse the order of the arguments
     (args,(kwd_struct = (*this)))
it compiles.

Why the discrepancy?


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