[cfe-dev] c++11 and invalid opcode

Piotr MadaliƄski piotr at madtricks.pl
Sun Feb 3 17:39:21 PST 2013

On 04.02.2013 02:01, Sean Silva wrote:
>> Your flip() function is causing undefined behaviour, as string::end()
>> returns an iterator to the character *following* the last character of
>> the string.  Dereferencing that iterator is not allowed, you can only
>> compare it against other iterators.
> Where exactly does it dereference the off-the-end iterator?
> std::reverse takes a half-open range.
> -- Sean Silva
Right. I think, that the code is correct.
The issue is probably some ABI-related problem on my machine.

More information about the cfe-dev mailing list