Open
Description
Assume for this example:
std::string a = "test", b = "eest";
std::memcpy(&a[0], &b[0], a.size());
The check will produce wrong code for C++11 and C++14, but correct for C++17 and newer:
std::string a = "test", b = "eest";
std::memcpy(a.data(), b.data(), a.size()); // error: cannot initialize a parameter of type 'void *' with an rvalue of type 'const char *'
I expect this check to remain for C++17 as it is, but for older will produce this code:
std::string a = "test", b = "eest";
std::memcpy(&a[0], b.data(), a.size());