summaryrefslogtreecommitdiffstats
path: root/libcxx/include/string
diff options
context:
space:
mode:
authorMarshall Clow <mclow.lists@gmail.com>2018-11-28 18:18:34 +0000
committerMarshall Clow <mclow.lists@gmail.com>2018-11-28 18:18:34 +0000
commit4d64d7dd641d385439a354db1f98cbb0ab7167f9 (patch)
tree92dad283f2876e7a9abc99640536de2378e30936 /libcxx/include/string
parent647782c78b609fd03dff5bfd68cadf6ac2b7a5af (diff)
downloadbcm5719-llvm-4d64d7dd641d385439a354db1f98cbb0ab7167f9.tar.gz
bcm5719-llvm-4d64d7dd641d385439a354db1f98cbb0ab7167f9.zip
Implement P0966 - string::reserve should not shrink
llvm-svn: 347789
Diffstat (limited to 'libcxx/include/string')
-rw-r--r--libcxx/include/string4
1 files changed, 3 insertions, 1 deletions
diff --git a/libcxx/include/string b/libcxx/include/string
index f7eba7dee83..31ad307e57b 100644
--- a/libcxx/include/string
+++ b/libcxx/include/string
@@ -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
OpenPOWER on IntegriCloud