On Sat, Nov 12, 2011 at 12:20 PM, Ovanes Markarian
<om_boost@keywallet.com> wrote:
Hi!
please see my answer below.
Hi,
Now I am trying to perform transform which mutates:
int
main()
{
B b1, b2;
auto z1 = fusion::make_list( b1, b2 ); !!! create a list of copied Bs
auto z2 = fusion::as_list( fusion::transform( z1, make_c() ) ); !!! copies Bs again
Actually transformation does not copy Bs. They are only copied at list construction , but transform calls the function:
inline typename result_of::as_list<Sequence const>::type
as_list(Sequence const& seq)
{
return result_of::as_list<Sequence const>::call(seq);
}
Which deals with a const sequence...
Regards,
Ovanes