diff options
author | Alistair Delva <adelva@google.com> | 2024-04-10 14:15:29 -0700 |
---|---|---|
committer | Alistair Delva <adelva@google.com> | 2024-04-11 12:58:28 -0700 |
commit | d0f0f90be16c2ac553b5fa08512045273135147a (patch) | |
tree | 5d9ebb7a04807ea8a609ddd18b0162bc87530e4b /Lib/std/std_basic_string.i | |
parent | 6ffc1dbf29ba98c4d8aa71ebc9b484e973fe1030 (diff) | |
download | swig-d0f0f90be16c2ac553b5fa08512045273135147a.tar.gz |
Update to v4.2.1HEADmastermainllvm-r522817
Change-Id: I47cef2be94299220d80265d949a95b58eee2c23b
Diffstat (limited to 'Lib/std/std_basic_string.i')
-rw-r--r-- | Lib/std/std_basic_string.i | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/Lib/std/std_basic_string.i b/Lib/std/std_basic_string.i index fb7afc1e6..e95cb4765 100644 --- a/Lib/std/std_basic_string.i +++ b/Lib/std/std_basic_string.i @@ -55,7 +55,16 @@ namespace std { size_type capacity() const; - void reserve(size_type __res_arg = 0); + void reserve(size_type __res_arg); + %extend { + void shrink_to_fit() { + %#if __cplusplus >= 202002L + self->shrink_to_fit(); + %#else + self->reserve(); + %#endif + } + } // Modifiers: |