From 0f998edbcdec932d9782707703578da84713cc6c Mon Sep 17 00:00:00 2001 From: redi Date: Mon, 7 Nov 2011 00:06:23 +0000 Subject: * include/bits/basic_string.h (basic_string::at): Move adjacent to other overload. (basic_string::pop_back): Define. * include/debug/string (__gnu_debug::basic_string::pop_back): Likewise. * include/ext/vstring.h (__versa_string::pop_back): Likewise. * config/abi/pre/gnu.ver: Add new symbols. * testsuite/21_strings/basic_string/modifiers/char/pop_back.cc: New. * testsuite/21_strings/basic_string/modifiers/wchar_t/pop_back.cc: New. * testsuite/21_strings/basic_string/range_access.cc: Split to ... * testsuite/21_strings/basic_string/range_access/char/1.cc: Here and ... * testsuite/21_strings/basic_string/range_access/wchar_t/1.cc: Here. * testsuite/ext/vstring/modifiers/char/pop_back.cc: New. * testsuite/ext/vstring/modifiers/wchar_t/pop_back.cc: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@181049 138bc75d-0d04-0410-961f-82ee72b054a4 --- libstdc++-v3/include/ext/vstring.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'libstdc++-v3/include/ext/vstring.h') diff --git a/libstdc++-v3/include/ext/vstring.h b/libstdc++-v3/include/ext/vstring.h index 5720daf3919..a613e364d3a 100644 --- a/libstdc++-v3/include/ext/vstring.h +++ b/libstdc++-v3/include/ext/vstring.h @@ -1140,6 +1140,17 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION return iterator(this->_M_data() + __pos); } +#ifdef __GXX_EXPERIMENTAL_CXX0X__ + /** + * @brief Remove the last character. + * + * The string must be non-empty. + */ + void + pop_back() + { this->_M_erase(size()-1, 1); } +#endif // __GXX_EXPERIMENTAL_CXX0X__ + /** * @brief Replace characters with value from another string. * @param __pos Index of first character to replace. -- cgit v1.2.1