
12 Nov
2011
12 Nov
'11
11:40 a.m.
On Sat, Nov 12, 2011 at 12:20 PM, Ovanes Markarian
Hi!
please see my answer below.
On Sat, Nov 12, 2011 at 12:03 PM, Gennadiy Rozental
wrote: 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