$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
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