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 |
||
|---|---|---|
| .. | ||
| abi.xml | ||
| algorithms.xml | ||
| allocator.xml | ||
| appendix_contributing.xml | ||
| appendix_free.xml | ||
| appendix_porting.xml | ||
| atomics.xml | ||
| auto_ptr.xml | ||
| backwards_compatibility.xml | ||
| bitmap_allocator.xml | ||
| build_hacking.xml | ||
| codecvt.xml | ||
| concurrency.xml | ||
| concurrency_extensions.xml | ||
| configure.xml | ||
| containers.xml | ||
| ctype.xml | ||
| debug.xml | ||
| debug_mode.xml | ||
| diagnostics.xml | ||
| documentation_hacking.xml | ||
| evolution.xml | ||
| extensions.xml | ||
| internals.xml | ||
| intro.xml | ||
| io.xml | ||
| iterators.xml | ||
| locale.xml | ||
| localization.xml | ||
| messages.xml | ||
| mt_allocator.xml | ||
| numerics.xml | ||
| parallel_mode.xml | ||
| policy_data_structures.xml | ||
| policy_data_structures_biblio.xml | ||
| prerequisites.xml | ||
| profile_mode.xml | ||
| shared_ptr.xml | ||
| spine.xml | ||
| status_cxx1998.xml | ||
| status_cxx2011.xml | ||
| status_cxx2014.xml | ||
| status_cxx2017.xml | ||
| status_cxxis29124.xml | ||
| status_cxxtr1.xml | ||
| status_cxxtr24733.xml | ||
| strings.xml | ||
| support.xml | ||
| test.xml | ||
| test_policy_data_structures.xml | ||
| using.xml | ||
| using_exceptions.xml | ||
| utilities.xml | ||