diff --git a/include/wx/defs.h b/include/wx/defs.h index 21a17fc077..7d67449000 100644 --- a/include/wx/defs.h +++ b/include/wx/defs.h @@ -639,6 +639,15 @@ typedef short int WXTYPE; ptr = NULL; } } + + // trivial implementation of std::swap() for primitive types + template + inline void wxSwap(T& first, T& second) + { + T tmp(first); + first = second; + second = tmp; + } #endif /*__cplusplus*/ /* size of statically declared array */