diff options
Diffstat (limited to 'libstdc++-v3/include')
| -rw-r--r-- | libstdc++-v3/include/ext/rc_string_base.h | 4 | ||||
| -rw-r--r-- | libstdc++-v3/include/ext/sso_string_base.h | 4 | ||||
| -rw-r--r-- | libstdc++-v3/include/ext/vstring.h | 2 |
3 files changed, 9 insertions, 1 deletions
diff --git a/libstdc++-v3/include/ext/rc_string_base.h b/libstdc++-v3/include/ext/rc_string_base.h index eec6f2dcf0d..1a896d827fe 100644 --- a/libstdc++-v3/include/ext/rc_string_base.h +++ b/libstdc++-v3/include/ext/rc_string_base.h @@ -338,6 +338,10 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) void _M_erase(size_type __pos, size_type __n); + void + _M_clear() + { _M_erase(size_type(0), _M_length()); } + bool _M_compare(const __rc_string_base&) const { return false; } diff --git a/libstdc++-v3/include/ext/sso_string_base.h b/libstdc++-v3/include/ext/sso_string_base.h index 1282eb6e53e..30988260dd7 100644 --- a/libstdc++-v3/include/ext/sso_string_base.h +++ b/libstdc++-v3/include/ext/sso_string_base.h @@ -226,6 +226,10 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) void _M_erase(size_type __pos, size_type __n); + void + _M_clear() + { _M_set_length(0); } + bool _M_compare(const __sso_string_base&) const { return false; } diff --git a/libstdc++-v3/include/ext/vstring.h b/libstdc++-v3/include/ext/vstring.h index 5cd84b15a30..d858949db46 100644 --- a/libstdc++-v3/include/ext/vstring.h +++ b/libstdc++-v3/include/ext/vstring.h @@ -409,7 +409,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) */ void clear() - { this->_M_erase(size_type(0), this->size()); } + { this->_M_clear(); } /** * Returns true if the %string is empty. Equivalent to *this == "". |

