1 /* { dg-do compile } */
2 /* { dg-options "-c -O -fgcse-after-reload -fnon-call-exceptions" } */
3 template < typename _Tp > class new_allocator
7 template < typename _Tp1 > struct rebind
9 typedef new_allocator < _Tp1 > other;
14 template < typename > class allocator;
16 template < typename _Alloc > struct __alloc_traits
18 typedef typename _Alloc::pointer pointer;
19 template < typename _Tp > struct rebind
21 typedef typename _Alloc::template rebind < _Tp >::other other;
26 template < typename _Tp, typename _Alloc > struct _Vector_base
30 __alloc_traits < _Alloc >::template rebind < _Tp >::other _Tp_alloc_type;
31 typedef typename __alloc_traits < _Tp_alloc_type >::pointer pointer;
35 pointer _M_end_of_storage;
42 template < typename _Tp, typename _Alloc = allocator < _Tp > >class vector:
43 _Vector_base < _Tp, _Alloc >
45 typedef _Vector_base < _Tp, _Alloc > _Base;
47 typedef typename _Base::pointer pointer;
51 _M_erase_at_end (this->_M_impl._M_start);
53 void _M_erase_at_end (pointer)
58 template < typename T > class clear_alloc:
59 public new_allocator < T >
66 new vector < int, clear_alloc < int > >;