https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79162
lucdanton at free dot fr changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |lucdanton at free dot fr
--- Comment #6 from lucdanton at free dot fr ---
As a heads-up, deduction was possible when the constructor was a non-template:
std::basic_string_view<CharT> sv = …;
// produces an std::basic_string<CharT>
auto into_string = std::basic_string { sv };
That made it possible to concisely convert a string view to its 'natural'
string
type, even in a generic context. (Unless I'm mistaken there is nothing in the
current basic_string_view interface that would allow to do the same, e.g.
sv.to_string().)
Now that's it a constrained constructor template, it looks like deduction picks
an std::initializer_list<CharT> constructor. So into_string ends up being an
std::basic_string<std::basic_string_view>.
Of course the only thing that is lost is conciseness, the user can resort to
any
of several other solutions.