2 ms·
Ha, it looks like they changed that in C++11. http://www.cplusplus.com/reference/string/string/data/ http://www.cplusplus.com/reference/string/string/data/ clai
by Someone 13y ago
Ha, it looks like they changed that in C++11. http://www.cplusplus.com/reference/string/string/data/ http://www.cplusplus.com/reference/string/string/data/ claims "Unspecified or contradictory specifications." for C++98, but constant complexity for C++11.
An answer to http://programmers.stackexchange.com/questions/124731/what-performance-can-we-expect-from-stdstrings-c-str-always-constant-time http://programmers.stackexchange.com/questions/124731/what-p... indicates that C++03 doesn't require constnat time, either.
Thanks for the education.