https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87822

--- Comment #13 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Created attachment 44936
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44936&action=edit
Patch for GCC 6.5

Fixed in the gcc-7 and gcc-8 branches.

This will not be fixed on gcc-6-branch, but for anybody who wants to apply it
locally, the patch for GCC 6.5 is attached, and reproduced here:

--- a/libstdc++-v3/include/bits/stl_pair.h
+++ b/libstdc++-v3/include/bits/stl_pair.h
@@ -187,7 +187,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
   };
 #endif // C++11

-  class __pair_base
+  template<typename _U1, typename _U2> class __pair_base
   {
 #if __cplusplus >= 201103L
     template<typename _T1, typename _T2> friend struct pair;
@@ -206,7 +206,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
    */
   template<typename _T1, typename _T2>
     struct pair
-    : private __pair_base
+    : private __pair_base<_T1, _T2>
     {
       typedef _T1 first_type;    /// @c first_type is the first bound type
       typedef _T2 second_type;   /// @c second_type is the second bound type

Reply via email to