PR libstdc++/79162 Fix std::string regression due to LWG 2946 (old ABI)
authorJonathan Wakely <jwakely@redhat.com>
Wed, 20 Sep 2017 22:03:37 +0000 (23:03 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Wed, 20 Sep 2017 22:03:37 +0000 (23:03 +0100)
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

libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/basic_string.h

index ceb883eab124fef699757e4543cd5c754bdda5b1..9be1db75bf79e359f867235bb69fc28838380b8b 100644 (file)
@@ -1,5 +1,10 @@
 2017-09-20  Jonathan Wakely  <jwakely@redhat.com>
 
+       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
        overload set when the argument is derived from basic_string.
index 8a382d5640c7afdd1c93dfb7c97e566b583ff03d..a4b81137571cda6462be37648d46d98a8524b3e2 100644 (file)
@@ -3439,6 +3439,7 @@ _GLIBCXX_END_NAMESPACE_CXX11
       template<typename _Tp, typename _Res>
        using _If_sv = enable_if_t<
          __and_<is_convertible<const _Tp&, __sv_type>,
+                __not_<is_convertible<const _Tp*, const basic_string*>>,
                 __not_<is_convertible<const _Tp&, const _CharT*>>>::value,
          _Res>;