
15 Dec
2010
15 Dec
'10
2:37 p.m.
On 15/12/2010 15:01, Matus Chochlik wrote:
That's a valid point, so the more efficient alternative to inplace transformation is to use another container for the output and an inserter.
Yes. Or you can use the transform adaptor in Boost.RangeEx, to adapt your elements into transformed elements without modifying the original range. Boost.Unicode (or Boost.Convert, as I'm going to separate it), also provides a convert adaptor, which is a generalization of the transform adaptor in that it allows N:M transformation rather 1:1 transformation. This is what it uses to adapt UTF-8 ranges into a UTF-32 ones.