Ian Lance Taylor wrote: > Daniel showed how this can fail for objects with internal pointers. > This includes __gnu_cxx::__vstring, which is likely to be the default > std::string class in libstdc++ 7, so this is not an unlikely occurrence.
The C++ standard limits the compiler's ability to introduce copies. It says "Here are where copies occur; some of these can be optimized away." It doesn't say anything about inserting more copies. So, depending on exactly how this works, it might or might not be technically standard-conforming to introduce copies at this point. -- Mark Mitchell CodeSourcery m...@codesourcery.com (650) 331-3385 x713