aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/include/bits/stl_vector.h
diff options
context:
space:
mode:
Diffstat (limited to 'libstdc++-v3/include/bits/stl_vector.h')
-rw-r--r--libstdc++-v3/include/bits/stl_vector.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/libstdc++-v3/include/bits/stl_vector.h b/libstdc++-v3/include/bits/stl_vector.h
index 06b94017c01..94acec2fb2c 100644
--- a/libstdc++-v3/include/bits/stl_vector.h
+++ b/libstdc++-v3/include/bits/stl_vector.h
@@ -15,7 +15,7 @@
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// As a special exception, you may use this file as part of a free software
@@ -568,6 +568,21 @@ namespace _GLIBCXX_STD
back() const
{ return *(end() - 1); }
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // DR 464. Suggestion for new member functions in standard containers.
+ // data access
+ /**
+ * Returns a pointer such that [data(), data() + size()) is a valid
+ * range. For a non-empty %vector, data() == &front().
+ */
+ pointer
+ data()
+ { return pointer(this->_M_impl._M_start); }
+
+ const_pointer
+ data() const
+ { return const_pointer(this->_M_impl._M_start); }
+
// [23.2.4.3] modifiers
/**
* @brief Add data to the end of the %vector.