A string literal is of type const char [N], and you can pass this type to a templated function that looks like:
template <uint64_t N>
void func(const char (&arg)[N]);
On cplusplus.com, there is no mention of such a templated constructor.
But, on cppreference.com, there is one that looks like this:
template<class StringViewLike>
explicit basic_string( const StringViewLike& t, Allocator& alloc = Allocator() );
I'm wondering if StringViewLike includes things like a const char array reference, like if you gave it a "string-literal", or does the "string-literal" argument to the constructor always use the const char*?
std::stringconstructed from"A\0B"stops at the embedded null character, unlike one constructed via"A\0B"s.) In fact, this answer to that question appears to address your question.char*overload requires a decay operation so it's less preferred.