PR 77264 constrain new std::basic_string overloads
authorJonathan Wakely <jwakely@redhat.com>
Wed, 17 Aug 2016 13:38:52 +0000 (14:38 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Wed, 17 Aug 2016 13:38:52 +0000 (14:38 +0100)
commit657213f7364a091c3347184d3ec8460d81f8022b
tree9d29eb7a41aee67e9a7953f9225b09c8c83787b1
parent11c4c4ba47fce0a6be2125e2bd7ee3d16bc8d8af
PR 77264 constrain new std::basic_string overloads

PR libstdc++/77264
* include/bits/basic_string.h (operator=(__sv_type)
(append(__sv_type), assign(__sv_type), insert(size_type, __sv_type))
(replace(size_type, size_type, __sv_type))
(replace(const_iterator, const_iterator, __sv_type))
(find(__sv_type, size_type), rfind(__sv_type, size_type))
(compare(size_type, size_type, __sv_type)): Reformat.
(_If_sv): Define helper for SFINAE constaints.
(append(const _Tp&, size_type, size_type))
(assign(const _Tp&, size_type, size_type))
(insert(size_type, const _Tp&, size_type, size_type))
(replace(size_type, size_type, const _Tp&, size_type, size_type)):
Use _If_sv.
* testsuite/21_strings/basic_string/modifiers/append/char/4.cc: Test
SFINAE constraints.
* testsuite/21_strings/basic_string/modifiers/append/wchar_t/4.cc:
Likewise.
* testsuite/21_strings/basic_string/modifiers/replace/char/7.cc:
Likewise.
* testsuite/21_strings/basic_string/modifiers/replace/wchar_t/7.cc:
Likewise.
* testsuite/21_strings/basic_string/modifiers/assign/char/4.cc:
Likewise.
* testsuite/21_strings/basic_string/modifiers/assign/wchar_t/4.cc:
Likewise.
* testsuite/21_strings/basic_string/modifiers/insert/char/3.cc:
Likewise.
* testsuite/21_strings/basic_string/modifiers/insert/wchar_t/3.cc:
Likewise.
* testsuite/21_strings/basic_string/modifiers/replace/char/7.cc:
Likewise.
* testsuite/21_strings/basic_string/operations/compare/char/2.cc:
Likewise.
* testsuite/21_strings/basic_string/operations/compare/wchar_t/2.cc:
Likewise.

From-SVN: r239532
12 files changed:
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/basic_string.h
libstdc++-v3/testsuite/21_strings/basic_string/modifiers/append/char/4.cc
libstdc++-v3/testsuite/21_strings/basic_string/modifiers/append/wchar_t/4.cc
libstdc++-v3/testsuite/21_strings/basic_string/modifiers/assign/char/4.cc
libstdc++-v3/testsuite/21_strings/basic_string/modifiers/assign/wchar_t/4.cc
libstdc++-v3/testsuite/21_strings/basic_string/modifiers/insert/char/3.cc
libstdc++-v3/testsuite/21_strings/basic_string/modifiers/insert/wchar_t/3.cc
libstdc++-v3/testsuite/21_strings/basic_string/modifiers/replace/char/7.cc
libstdc++-v3/testsuite/21_strings/basic_string/modifiers/replace/wchar_t/7.cc
libstdc++-v3/testsuite/21_strings/basic_string/operations/compare/char/2.cc
libstdc++-v3/testsuite/21_strings/basic_string/operations/compare/wchar_t/2.cc