summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2005-12-15 11:31:59 +0000
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2005-12-15 11:31:59 +0000
commit4f240804b0bb9c7621269a96fde5c1d1b4f3b0bf (patch)
tree08d5ce2c899415397c7a44696145113e226c600d
parent476c49c654bdcc75161f4791991d1a828a274964 (diff)
downloadppe42-gcc-4f240804b0bb9c7621269a96fde5c1d1b4f3b0bf.tar.gz
ppe42-gcc-4f240804b0bb9c7621269a96fde5c1d1b4f3b0bf.zip
2005-12-15 Paolo Carlini <pcarlini@suse.de>
* include/bits/stl_vector.h (vector<>::_M_get_Tp_allocator): Change to return by ref and add non const version. * include/bits/stl_deque.h (deque<>::_M_get_Tp_allocator): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@108570 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--libstdc++-v3/ChangeLog6
-rw-r--r--libstdc++-v3/include/bits/stl_deque.h6
-rw-r--r--libstdc++-v3/include/bits/stl_vector.h6
3 files changed, 16 insertions, 2 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 5197f12c3ef..92540fba329 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,5 +1,11 @@
2005-12-15 Paolo Carlini <pcarlini@suse.de>
+ * include/bits/stl_vector.h (vector<>::_M_get_Tp_allocator): Change
+ to return by ref and add non const version.
+ * include/bits/stl_deque.h (deque<>::_M_get_Tp_allocator): Likewise.
+
+2005-12-15 Paolo Carlini <pcarlini@suse.de>
+
PR libstdc++/25421
* config/locale/gnu/c_locale.cc (_S_destroy_c_locale): Check
for null argument.
diff --git a/libstdc++-v3/include/bits/stl_deque.h b/libstdc++-v3/include/bits/stl_deque.h
index e5f5beb43f9..eb534ca8c94 100644
--- a/libstdc++-v3/include/bits/stl_deque.h
+++ b/libstdc++-v3/include/bits/stl_deque.h
@@ -395,7 +395,11 @@ namespace _GLIBCXX_STD
{ }
};
- _Tp_alloc_type
+ _Tp_alloc_type&
+ _M_get_Tp_allocator()
+ { return *static_cast<_Tp_alloc_type*>(&this->_M_impl); }
+
+ const _Tp_alloc_type&
_M_get_Tp_allocator() const
{ return *static_cast<const _Tp_alloc_type*>(&this->_M_impl); }
diff --git a/libstdc++-v3/include/bits/stl_vector.h b/libstdc++-v3/include/bits/stl_vector.h
index 7d8519cdfdd..d8ea4b37047 100644
--- a/libstdc++-v3/include/bits/stl_vector.h
+++ b/libstdc++-v3/include/bits/stl_vector.h
@@ -91,7 +91,11 @@ namespace _GLIBCXX_STD
public:
typedef _Alloc allocator_type;
- _Tp_alloc_type
+ _Tp_alloc_type&
+ _M_get_Tp_allocator()
+ { return *static_cast<_Tp_alloc_type*>(&this->_M_impl); }
+
+ const _Tp_alloc_type&
_M_get_Tp_allocator() const
{ return *static_cast<const _Tp_alloc_type*>(&this->_M_impl); }
OpenPOWER on IntegriCloud