VS 2015 std::char_traits operations
Nothing in std::char_traits::copy says to return src when count is zero.  Further, we must return a pointer to modifiable char_type, which also precludes returning src.

So I think we should write:

#include &lt;cstring&gt;
#include &lt;string&gt;

struct string_custom_traits : public std::char_traits&lt;char16_t&gt;
{
    static char_type * copy(char_type* dest, const char_type* src, size_t count)
    {
        return (char_type*)std::memcpy(dest, src, count * sizeof *src);
    }

    static char_type *move(char_type* dest, const char_type* src, size_t count)
    {
        return (char_type*)std::memmove(dest, src, count * sizeof *src);
    }
};


I've used the template-provided alias char_type for consistency and in case you want to turn this traits class into a template itself.

Make sure you understand and accept the differences between UCS-2 and UTF-16 if you handle characters outside the BMP.