diff options
author | pfg <pfg@FreeBSD.org> | 2012-06-10 02:04:11 +0000 |
---|---|---|
committer | pfg <pfg@FreeBSD.org> | 2012-06-10 02:04:11 +0000 |
commit | 604fef60a73f1b747d3a773bbf9822a6a505d85d (patch) | |
tree | b4310b1434d6fbc140b23fb644abb1183568ff52 /contrib/libstdc++/include/bits/stl_vector.h | |
parent | 723899fa5c91cf5bb546942f05ad02ffb04560cf (diff) | |
download | FreeBSD-src-604fef60a73f1b747d3a773bbf9822a6a505d85d.zip FreeBSD-src-604fef60a73f1b747d3a773bbf9822a6a505d85d.tar.gz |
Bring a couple of libstdc++ patches from Apple's llvm-gcc project.
Modified Fri Jul 10 07:44:34 2009 CDT by rafael
backport part of
http://gcc.gnu.org/ml/gcc-cvs/2007-10/msg00118.html
The patch is for libstdc++ and it was GPL2 at the time.
Modified Tue Apr 29 01:20:19 2008 CDT by asl
Backport from mainline (pre-GPLv3).
Fix for sizeof(const void*) > sizeof(unsigned long).
Approved by: jhb (mentor)
MFC after: 2 weeks
Diffstat (limited to 'contrib/libstdc++/include/bits/stl_vector.h')
-rw-r--r-- | contrib/libstdc++/include/bits/stl_vector.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/contrib/libstdc++/include/bits/stl_vector.h b/contrib/libstdc++/include/bits/stl_vector.h index a81c597..1b794dc 100644 --- a/contrib/libstdc++/include/bits/stl_vector.h +++ b/contrib/libstdc++/include/bits/stl_vector.h @@ -84,6 +84,11 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD) _Tp* _M_start; _Tp* _M_finish; _Tp* _M_end_of_storage; + + _Vector_impl() + : _Tp_alloc_type(), _M_start(0), _M_finish(0), _M_end_of_storage(0) + { } + _Vector_impl(_Tp_alloc_type const& __a) : _Tp_alloc_type(__a), _M_start(0), _M_finish(0), _M_end_of_storage(0) { } @@ -104,6 +109,9 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD) get_allocator() const { return allocator_type(_M_get_Tp_allocator()); } + _Vector_base() + : _M_impl() { } + _Vector_base(const allocator_type& __a) : _M_impl(__a) { } @@ -194,8 +202,11 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD) /** * @brief Default constructor creates no elements. */ + vector() + : _Base() { } + explicit - vector(const allocator_type& __a = allocator_type()) + vector(const allocator_type& __a) : _Base(__a) { } |