From fcf6e948d1e49d5da23106e86b4539897a459088 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Sun, 22 Apr 2012 13:42:38 +0000 Subject: [PATCH] ptr_traits.h (pointer_traits::rebind): Make public. * 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 | 6 ++++++ libstdc++-v3/include/bits/ptr_traits.h | 6 ------ .../20_util/pointer_traits/requirements/typedefs.cc | 1 + 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index fc39c1ef2a9..fb36ccbd580 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,9 @@ +2012-04-22 Jonathan Wakely + + * 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 * include/debug/forward_list (forward_list::splice_after): Check diff --git a/libstdc++-v3/include/bits/ptr_traits.h b/libstdc++-v3/include/bits/ptr_traits.h index 7f120b1f8ac..bba9b49bfc6 100644 --- a/libstdc++-v3/include/bits/ptr_traits.h +++ b/libstdc++-v3/include/bits/ptr_traits.h @@ -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 using rebind = typename __ptrtr_rebind<_Ptr, _Up>::__type; - - // allocator_traits needs to use __rebind - template friend struct allocator_traits; - template friend struct pointer_traits; - template friend class __ptrtr_rebind_helper2; }; /** diff --git a/libstdc++-v3/testsuite/20_util/pointer_traits/requirements/typedefs.cc b/libstdc++-v3/testsuite/20_util/pointer_traits/requirements/typedefs.cc index c682557a0e3..47b5212ff01 100644 --- a/libstdc++-v3/testsuite/20_util/pointer_traits/requirements/typedefs.cc +++ b/libstdc++-v3/testsuite/20_util/pointer_traits/requirements/typedefs.cc @@ -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 rebind_type; } int main()