Fixes for deprecated std::basic_string::reserve()
This commit is contained in:
parent
675c94c575
commit
ffbde7a132
3 changed files with 32 additions and 1 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue