Fixes for deprecated std::basic_string::reserve()

This commit is contained in:
William S Fulton 2022-07-30 23:21:21 +01:00
commit ffbde7a132
3 changed files with 32 additions and 1 deletions

View file

@ -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: