For example:
std::u8string x = "potato";
std::string a(x.begin(), x.end());
std::string b(x.data(), x.size());
std::string c(std::from_range, x);
could all be implemented with memcpy. At the very least, this should happen when initializing std::basic_string<char, std::char_traits<char>> from std::basic_string<T, std::char_traits<T>> when T is an integral type with size 1. More generally, I think this optimization could apply when the source and target element types are integral types of the same size and the target traits type is library-provided.