2005-12-15 Paolo Carlini <pcarlini@suse.de>
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 15 Dec 2005 11:31:59 +0000 (11:31 +0000)
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 15 Dec 2005 11:31:59 +0000 (11:31 +0000)
* 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

libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/stl_deque.h
libstdc++-v3/include/bits/stl_vector.h

index 5197f12..92540fb 100644 (file)
@@ -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.
index e5f5beb..eb534ca 100644 (file)
@@ -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); }
 
index 7d8519c..d8ea4b3 100644 (file)
@@ -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); }