mirror of git://gcc.gnu.org/git/gcc.git
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 |
||
|---|---|---|
| .. | ||
| 17_intro | ||
| 18_support | ||
| 19_diagnostics | ||
| 20_util | ||
| 21_strings | ||
| 22_locale | ||
| 23_containers | ||
| 24_iterators | ||
| 25_algorithms | ||
| 26_numerics | ||
| 27_io | ||
| 28_regex | ||
| 29_atomics | ||
| 30_threads | ||
| abi | ||
| backward | ||
| config | ||
| data | ||
| decimal | ||
| experimental | ||
| ext | ||
| lib | ||
| libstdc++-abi | ||
| libstdc++-dg | ||
| libstdc++-prettyprinters | ||
| libstdc++-xmethods | ||
| performance | ||
| special_functions | ||
| tr1 | ||
| tr2 | ||
| util | ||
| Makefile.am | ||
| Makefile.in | ||