Commit 9d2bac69 by Jonathan Wakely Committed by Jonathan Wakely

PR libstdc++/79162 Fix std::string regression due to LWG 2946 (old ABI)

	PR libstdc++/79162
	* include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
	(basic_string::_If_sv): Remove from the overload set when the
	argument is derived from basic_string.

From-SVN: r253035
parent 94c23e39
2017-09-20 Jonathan Wakely <jwakely@redhat.com> 2017-09-20 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/79162 PR libstdc++/79162
* include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
(basic_string::_If_sv): Remove from the overload set when the
argument is derived from basic_string.
PR libstdc++/79162
* include/bits/basic_string.h (basic_string::_If_sv): Remove from the * include/bits/basic_string.h (basic_string::_If_sv): Remove from the
overload set when the argument is derived from basic_string. overload set when the argument is derived from basic_string.
* testsuite/21_strings/basic_string/cons/char/moveable2_c++17.cc: New * testsuite/21_strings/basic_string/cons/char/moveable2_c++17.cc: New
......
...@@ -3439,6 +3439,7 @@ _GLIBCXX_END_NAMESPACE_CXX11 ...@@ -3439,6 +3439,7 @@ _GLIBCXX_END_NAMESPACE_CXX11
template<typename _Tp, typename _Res> template<typename _Tp, typename _Res>
using _If_sv = enable_if_t< using _If_sv = enable_if_t<
__and_<is_convertible<const _Tp&, __sv_type>, __and_<is_convertible<const _Tp&, __sv_type>,
__not_<is_convertible<const _Tp*, const basic_string*>>,
__not_<is_convertible<const _Tp&, const _CharT*>>>::value, __not_<is_convertible<const _Tp&, const _CharT*>>>::value,
_Res>; _Res>;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment