C++20 constexpr std::copy optimizations for run-time
We can have our cake and eat it to, too. Let’s just consider the simplest specialization of copy, the one that copies chars. In C++17, that might look like: char* copy(char const* first, char const* last, char* d) { memcpy(d, first, last – first); return d + (last – first); } Of course, we can’t … Read more