Implement P0966 - string::reserve should not shrink
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@347789 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -956,9 +956,11 @@ public:
|
||||
void resize(size_type __n, value_type __c);
|
||||
_LIBCPP_INLINE_VISIBILITY void resize(size_type __n) {resize(__n, value_type());}
|
||||
|
||||
void reserve(size_type __res_arg);
|
||||
_LIBCPP_INLINE_VISIBILITY void __resize_default_init(size_type __n);
|
||||
|
||||
void reserve(size_type __res_arg = 0);
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
void reserve() _NOEXCEPT {reserve(0);}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
void shrink_to_fit() _NOEXCEPT {reserve();}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
|
||||
Reference in New Issue
Block a user