]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ptr_traits.h (pointer_traits::rebind): Make public.
authorJonathan Wakely <jwakely.gcc@gmail.com>
Sun, 22 Apr 2012 13:42:38 +0000 (13:42 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Sun, 22 Apr 2012 13:42:38 +0000 (14:42 +0100)
* include/bits/ptr_traits.h (pointer_traits::rebind): Make public.
* testsuite/20_util/pointer_traits/requirements/typedefs.cc: Check
rebind works.

From-SVN: r186670

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

index fc39c1ef2a9e430e3f0846e919f1db51980f1e2f..fb36ccbd580353b0345ef481f26380a1d5a2ce9e 100644 (file)
@@ -1,3 +1,9 @@
+2012-04-22  Jonathan Wakely  <jwakely.gcc@gmail.com>
+
+       * include/bits/ptr_traits.h (pointer_traits::rebind): Make public.
+       * testsuite/20_util/pointer_traits/requirements/typedefs.cc: Check
+       rebind works.
+
 2012-04-22  Jonathan Wakely  <jwakely.gcc@gmail.com>
 
        * include/debug/forward_list (forward_list::splice_after): Check
index 7f120b1f8accfa62b5dc4b660a96c3fa2756a7d2..bba9b49bfc6c0773731486ffd49a67585ad0fa87 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 c682557a0e3664aab48e322689e57aad21ec2e18..47b5212ff01d3104d7579684b6c45edba9a7f7ea 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()