“ C ++编程语言”第4版第36.3.6节中的代码是否具有明确的行为?
在Bjarne Stroustrup的C ++编程语言第4版第36.3.6 STL类操作中,以下代码用作链接的示例: void f2() { std::string s = "but I have heard it works even if you don't believe in it" ; s.replace(0, 4, "" ).replace( s.find( "even" ), 4, "only" ) .replace( s.find( " don't" ), 6, "" ); assert( s == "I have heard it works …