On Sun, Jul 11, 2010 at 5:37 PM, Stefano <pelux@ngi.it> wrote:

> You are entirely correct. The reverse function is missing the const overload,
and this will cause a problem when returning a temporary to a constant range
that has mutable elements. A workaround, which I expect you have already thought
of, would be to hold a const reference to the range in a variable and pass this
into reverse.I shall put a correction into the trunk as soon as possible. I
shall also review all of the algorithm functions for similar mistakes.I
apologize for my oversight and for any inconvenience this has caused. 

The correction to the temporary lifetime issues is committed to the trunk along with a lot of new test cases. This has introduced some regressions for compilers that can't seem to pick the appropriate const versus non-const overloads. I am working on removing the regression while preserving the capability of working with temporaries.

I hope this helps.

Regards,
Neil Groves