[PATCH] Add std::string constructor for substring of string_view (LWG 2742)

Jonathan Wakely jwakely@redhat.com
Tue Nov 15 19:32:00 GMT 2016


On 15/11/16 14:33 +0000, Jonathan Wakely wrote:
>This is another issue resolution for C++17 features that was approved
>at the recent meeting. I think this resolution is wrong too, but in
>this case the fix is obvious so I've gone ahead and done it.
>
>	* doc/xml/manual/intro.xml: Document LWG 2742 status.
>	* doc/html/*: Regenerate.
>	* include/bits/basic_string.h
>	(basic_string(const T&, size_type, size_type, const Allocator&)): Add
>	constructor for substring of basic_string_view, as per LWG 2742 but
>	with additional constraint to fix ambiguity.
>	* testsuite/21_strings/basic_string/cons/char/9.cc: New test.
>	* testsuite/21_strings/basic_string/cons/wchar_t/9.cc: New test.
>
>Tested powerpc64le-linux, comitted to trunk.

I forgot I already added an convenience alias template for checking
the condition in this patch.

Tested powerpc64le-linux, comitted to trunk.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.txt
Type: text/x-patch
Size: 1976 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20161115/a9df100a/attachment.bin>


More information about the Libstdc++ mailing list