gcc/libstdc++-v3/testsuite/21_strings/basic_string
Jonathan Wakely 5d84e6c53e LWG 3076 basic_string CTAD ambiguity
When deduction guides are supported by the compiler (i.e. for C++17 and
later) replace two basic_string constructors by constrained function
templates as required by LWG 3075. In order to ensure that the pre-C++17
non-template constructors are still exported from the shared library
define a macro in src/c++11/string-inst.cc to force the non-template
declarations (this isn't strictly needed yet, because the string
instantiations are compiled with -std=gnu++11, but that is likely to
change).

	LWG 3076 basic_string CTAD ambiguity
	* doc/xml/manual/intro.xml: Document LWG 3076 change.
	* include/bits/basic_string.h
	[__cpp_deduction_guides && !_GLIBCXX_DEFINING_STRING_INSTANTIATIONS]
	(basic_string(const _CharT*, const _Alloc&)): Turn into a function
	template constrained by _RequireAllocator.
	(basic_string(size_type, _CharT, const _Alloc&)): Likewise.
	* src/c++11/string-inst.cc (_GLIBCXX_DEFINING_STRING_INSTANTIATIONS):
	Define.
	* testsuite/21_strings/basic_string/cons/char/deduction.cc: Test
	deduction
	* testsuite/21_strings/basic_string/cons/wchar_t/deduction.cc:
	Likewise.

From-SVN: r261670
2018-06-16 00:47:33 +01:00
..
allocator Update copyright years. 2018-01-03 11:03:58 +01:00
capacity Update copyright years. 2018-01-03 11:03:58 +01:00
cons LWG 3076 basic_string CTAD ambiguity 2018-06-16 00:47:33 +01:00
element_access Update copyright years. 2018-01-03 11:03:58 +01:00
inserters_extractors Update copyright years. 2018-01-03 11:03:58 +01:00
literals Update copyright years. 2018-01-03 11:03:58 +01:00
modifiers Update copyright years. 2018-01-03 11:03:58 +01:00
numeric_conversions Update copyright years. 2018-01-03 11:03:58 +01:00
operations PR libstdc++/86169 unshare COW string when non-const data() called 2018-06-15 19:47:29 +01:00
operators Update copyright years. 2018-01-03 11:03:58 +01:00
range_access Update copyright years. 2018-01-03 11:03:58 +01:00
requirements Update copyright years. 2018-01-03 11:03:58 +01:00
types Update copyright years. 2018-01-03 11:03:58 +01:00
40160.cc Update copyright years. 2018-01-03 11:03:58 +01:00
56166.cc Update copyright years. 2018-01-03 11:03:58 +01:00
79162.cc Update copyright years. 2018-01-03 11:03:58 +01:00
dr2268.cc PR libstdc++/84087 add default arguments to basic_string members (LWG 2268) 2018-05-03 16:01:20 +01:00
init-list.cc Update copyright years. 2018-01-03 11:03:58 +01:00
lwg2758.cc Update copyright years. 2018-01-03 11:03:58 +01:00
lwg2946.cc Update copyright years. 2018-01-03 11:03:58 +01:00
pthread4.cc Update copyright years. 2018-01-03 11:03:58 +01:00
pthread18185.cc Update copyright years. 2018-01-03 11:03:58 +01:00
pthread33394.cc Update copyright years. 2018-01-03 11:03:58 +01:00