]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
stl_vector.h (vector<>::_M_get_Tp_allocator): Change to return by ref and add non...
authorPaolo Carlini <pcarlini@suse.de>
Thu, 15 Dec 2005 11:31:59 +0000 (11:31 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Thu, 15 Dec 2005 11:31:59 +0000 (11:31 +0000)
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.

From-SVN: r108570

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

index 5197f12c3ef34062cc17c3717f722106002e96e3..92540fba329c9c1b49aad34a479995d5d998411b 100644 (file)
@@ -1,3 +1,9 @@
+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
index e5f5beb43f931dc31ab89b350f94fe36487629fe..eb534ca8c94066a3d7d002557d6f60bb7cad9be8 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 7d8519cdfdd4738d2c2412d1b45e904b0dd3f89e..d8ea4b37047f4a841313ab0f716c26b3cfdfde14 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); }