OSDN Git Service

PR libstdc++/53027
authorredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 22 Apr 2012 14:14:15 +0000 (14:14 +0000)
committerredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 22 Apr 2012 14:14:15 +0000 (14:14 +0000)
* include/bits/ptr_traits.h (pointer_traits::rebind): Make public.
* testsuite/20_util/pointer_traits/requirements/typedefs.cc: Check
rebind works.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch@186671 138bc75d-0d04-0410-961f-82ee72b054a4

libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/ptr_traits.h
libstdc++-v3/testsuite/20_util/pointer_traits/requirements/typedefs.cc

index c780113..005367a 100644 (file)
@@ -1,3 +1,10 @@
+2012-04-22  Jonathan Wakely  <jwakely.gcc@gmail.com>
+
+       PR libstdc++/53027
+       * include/bits/ptr_traits.h (pointer_traits::rebind): Make public.
+       * testsuite/20_util/pointer_traits/requirements/typedefs.cc: Check
+       rebind works.
+
 2012-04-21  Alan Modra  <amodra@gmail.com>
 
        PR libstdc++/52839
index 7f120b1..bba9b49 100644 (file)
@@ -140,14 +140,8 @@ _GLIBCXX_HAS_NESTED_TYPE(difference_type)
       /// Type used to represent the difference between two pointers
       typedef typename __ptrtr_diff_type<_Ptr>::__type  difference_type;
 
-    private:
       template<typename _Up>
         using rebind = typename __ptrtr_rebind<_Ptr, _Up>::__type;
-
-      // allocator_traits needs to use __rebind
-      template<typename> friend struct allocator_traits;
-      template<typename> friend struct pointer_traits;
-      template<typename, typename> friend class __ptrtr_rebind_helper2;
     };
 
   /**
index c682557..47b5212 100644 (file)
@@ -32,6 +32,7 @@ void test01()
   typedef typename test_type::pointer           pointer;
   typedef typename test_type::element_type      element_type;
   typedef typename test_type::difference_type   difference_type;
+  typedef typename test_type::template rebind<char> rebind_type;
 }
 
 int main()