C++ standard inaccuracy

Author:Wojciech Muła
Added on:2014-03-11

First we read:

21.4.1 basic_string general requirements [string.require]

[...]

3 No erase() or pop_back() member function shall throw any exceptions.

... a few pages later:

21.4.6.5 basic_string::erase [string::erase]

basic_string<charT,traits, Allocator>& erase(size_type pos = 0, size_type n = npos);

[...]

2 Throws: out_of_range if pos > size().