diff options
author | Jonathan Wakely <jwakely.gcc@gmail.com> | 2011-10-04 20:34:54 +0000 |
---|---|---|
committer | Jonathan Wakely <redi@gcc.gnu.org> | 2011-10-04 21:34:54 +0100 |
commit | 73f050310177d90d001d90a1e639d59309efd40e (patch) | |
tree | 483c6f7252fc7d791893fd151de372b8053ad8e8 /libstdc++-v3/include/bits | |
parent | 97f26732675a4a388b79d927876443c92a55c8c7 (diff) | |
download | gcc-73f050310177d90d001d90a1e639d59309efd40e.tar.gz |
alloc_traits.h (__alloc_traits::max_size): Define.
2011-10-04 Jonathan Wakely <jwakely.gcc@gmail.com>
* include/ext/alloc_traits.h (__alloc_traits::max_size): Define.
(__alloc_traits::rebind): Define.
* include/bits/stl_vector.h: Use them.
* testsuite/util/testsuite_allocator.h (SimpleAllocator): Define.
* testsuite/23_containers/vector/allocator/minimal.cc: New.
* testsuite/23_containers/vector/requirements/dr438/assign_neg.cc:
Adjust dg-error line numbers.
* testsuite/23_containers/vector/requirements/dr438/insert_neg.cc:
Likewise.
* testsuite/23_containers/vector/requirements/dr438/
constructor_1_neg.cc: Likewise.
* testsuite/23_containers/vector/requirements/dr438/
constructor_2_neg.cc: Likewise.
From-SVN: r179523
Diffstat (limited to 'libstdc++-v3/include/bits')
-rw-r--r-- | libstdc++-v3/include/bits/stl_vector.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libstdc++-v3/include/bits/stl_vector.h b/libstdc++-v3/include/bits/stl_vector.h index 40664209fab..869bcf74489 100644 --- a/libstdc++-v3/include/bits/stl_vector.h +++ b/libstdc++-v3/include/bits/stl_vector.h @@ -70,7 +70,8 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER template<typename _Tp, typename _Alloc> struct _Vector_base { - typedef typename _Alloc::template rebind<_Tp>::other _Tp_alloc_type; + typedef typename __gnu_cxx::__alloc_traits<_Alloc>::template + rebind<_Tp>::other _Tp_alloc_type; typedef typename __gnu_cxx::__alloc_traits<_Tp_alloc_type>::pointer pointer; @@ -643,7 +644,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER /** Returns the size() of the largest possible %vector. */ size_type max_size() const _GLIBCXX_NOEXCEPT - { return _M_get_Tp_allocator().max_size(); } + { return _Alloc_traits::max_size(_M_get_Tp_allocator()); } #ifdef __GXX_EXPERIMENTAL_CXX0X__ /** |