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

Jonathan Wakely jwakely@redhat.com
Tue Nov 15 14:34:00 GMT 2016


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.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.txt
Type: text/x-patch
Size: 6703 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20161115/28671f88/attachment.bin>


More information about the Libstdc++ mailing list