20 Sep
2006
20 Sep
'06
2:33 p.m.
Flex Ferrum wrote:
map
m; vector<int> a,b; std::transform(a.begin(), a.end(), std::back_inserter(b), var(m)[_1]);
Is this a case where transform is not appropriate? My understanding is that the operation supplied to transform must not have any side effects, and here m may be modified by operator[]. Does this count as a side effect? Thanks, David