diff --git a/include/wx/dynarray.h b/include/wx/dynarray.h index d3e1a2bb04..e6d9b8113b 100644 --- a/include/wx/dynarray.h +++ b/include/wx/dynarray.h @@ -164,8 +164,12 @@ public: void Alloc(size_t uiSize) { this->reserve(uiSize); } void Shrink() { +#if !wxUSE_STD_CONTAINERS || __cplusplus >= 201103L || wxCHECK_VISUALC_VERSION(10) + this->shrink_to_fit(); +#else std::vector tmp(*this); this->swap(tmp); +#endif } size_t GetCount() const { return this->size(); }