Commit fcf6e948 by Jonathan Wakely Committed by Jonathan Wakely

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
parent 7c688ade
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
allocators are equal.
* src/c++11/debug.cc: Fix spelling.
......
......@@ -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;
};
/**
......
......@@ -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()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment