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
This commit is contained in:
Jonathan Wakely 2012-04-22 13:42:38 +00:00 committed by Jonathan Wakely
parent 7c688aded4
commit fcf6e948d1
3 changed files with 7 additions and 6 deletions

View 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

View 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;
};
/**

View 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()