diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index fc39c1ef2a9e..fb36ccbd5803 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 7f120b1f8acc..bba9b49bfc6c 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 c682557a0e36..47b5212ff01d 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()