Recent Intel processors have "fast rep stos" which basically allows the compiler to always inline memset (which they couldn't do in the aliasing case).
since it's std::memset, the compiler could theoretically inline it or have a small-count path that uses vector intrinsics
It could, but for a case without a known count it doesn't really make sense to do that. (I honestly found the concern to be kind of strange for that reason, honestly.)
A memset tail call would be less code size than the loop, so it's still worth it even for cold code.
I believe restrict is a C only keyword, so no, it couldn't have helped.
While not standardized, restrict or __restrict are indeed supported by most C++ compilers. Visual C++ even supports a declspec(restrict) that can apply to the function rather than just individual arguments.