Commit 08bf5bb3 by Bob Walters Committed by Paolo Carlini

stl_vector.h (_Vector_base<>::_Vector_impl::_M_start, [...]): Use _Tp_alloc_type::pointer.

2008-10-08  Bob Walters  <bob.s.walters@gmail.com>

	* include/bits/stl_vector.h (_Vector_base<>::_Vector_impl::_M_start,
	_M_finish, _M_end_of_storage, _Vector_base<>::_M_allocate,
	_M_deallocate): Use _Tp_alloc_type::pointer.

From-SVN: r140977
parent b7f58d5d
2008-10-08 Bob Walters <bob.s.walters@gmail.com>
* include/bits/stl_vector.h (_Vector_base<>::_Vector_impl::_M_start,
_M_finish, _M_end_of_storage, _Vector_base<>::_M_allocate,
_M_deallocate): Use _Tp_alloc_type::pointer.
2008-10-07 Jason Merrill <jason@redhat.com>
PR libstdc++/37761
......
......@@ -78,9 +78,9 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
struct _Vector_impl
: public _Tp_alloc_type
{
_Tp* _M_start;
_Tp* _M_finish;
_Tp* _M_end_of_storage;
typename _Tp_alloc_type::pointer _M_start;
typename _Tp_alloc_type::pointer _M_finish;
typename _Tp_alloc_type::pointer _M_end_of_storage;
_Vector_impl()
: _Tp_alloc_type(), _M_start(0), _M_finish(0), _M_end_of_storage(0)
......@@ -140,12 +140,12 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
public:
_Vector_impl _M_impl;
_Tp*
typename _Tp_alloc_type::pointer
_M_allocate(size_t __n)
{ return __n != 0 ? _M_impl.allocate(__n) : 0; }
void
_M_deallocate(_Tp* __p, size_t __n)
_M_deallocate(typename _Tp_alloc_type::pointer __p, size_t __n)
{
if (__p)
_M_impl.deallocate(__p, __n);
......
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