|
Boost Users : |
From: David Walthall (walthall_at_[hidden])
Date: 2006-09-20 10:33:57
Flex Ferrum wrote:
> map<int,int> 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
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