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_bvector.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_bvector.h')
-rw-r--r-- | contrib/libstdc++/include/bits/stl_bvector.h | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/contrib/libstdc++/include/bits/stl_bvector.h b/contrib/libstdc++/include/bits/stl_bvector.h index 9dc2656..5f494ed 100644 --- a/contrib/libstdc++/include/bits/stl_bvector.h +++ b/contrib/libstdc++/include/bits/stl_bvector.h @@ -385,6 +385,11 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD) _Bit_iterator _M_start; _Bit_iterator _M_finish; _Bit_type* _M_end_of_storage; + + _Bvector_impl() + : _Bit_alloc_type(), _M_start(), _M_finish(), _M_end_of_storage(0) + { } + _Bvector_impl(const _Bit_alloc_type& __a) : _Bit_alloc_type(__a), _M_start(), _M_finish(), _M_end_of_storage(0) { } @@ -405,7 +410,11 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD) get_allocator() const { return allocator_type(_M_get_Bit_allocator()); } - _Bvector_base(const allocator_type& __a) : _M_impl(__a) { } + _Bvector_base() + : _M_impl() { } + + _Bvector_base(const allocator_type& __a) + : _M_impl(__a) { } ~_Bvector_base() { this->_M_deallocate(); } @@ -480,8 +489,11 @@ template<typename _Alloc> using _Base::_M_get_Bit_allocator; public: + vector() + : _Base() { } + explicit - vector(const allocator_type& __a = allocator_type()) + vector(const allocator_type& __a) : _Base(__a) { } explicit @@ -678,7 +690,7 @@ template<typename _Alloc> } void - swap(vector<bool, _Alloc>& __x) + swap(vector& __x) { std::swap(this->_M_impl._M_start, __x._M_impl._M_start); std::swap(this->_M_impl._M_finish, __x._M_impl._M_finish); |