3 ms·
But the temporary copy only happens going from const char * to std::string, so the C code would have to be calling C++ code. std::string to const char doesn’t
by sseagull 4y ago
But the temporary copy only happens going from const char * to std::string, so the C code would have to be calling C++ code.
std::string to const char doesn’t (usually?) require copying.