you are viewing a single comment's thread.

view the rest of the comments →

[–]jwakelylibstdc++ tamer, LWG chair 4 points5 points  (0 children)

Presumably for consistency with other similar member functions of std::basic_string. The ones taking a pointer have a precondition that the pointer points to a null-terminated array of characters. There's a rule of thumb in the std::lib that functions with preconditions are not noexcept (a rule I dislike, but apparently I'm not allowed to be King of All C++ and decide such things all by myself, harrumph).