1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

0029258: Foundation Classes - provide move constructors for string classes

New macro OCCT_NO_RVALUE_REFERENCE is introduced to disable methods using move semantics on obsolete compilers that do not support rvalue references.

TCollection_AsciiString, TCollection_ExtendedString, NCollection_UtfString - added method Swap(), move constructor, and move assignment operator.

Draw command QATestArrayMove is added to test for memory corruption if NCollection_Array1<> bound to local C buffer is returned from function by value.
This commit is contained in:
kgv
2017-10-15 16:08:01 +03:00
committed by bugmaster
parent 4ecf34cce7
commit 6286195cff
9 changed files with 209 additions and 22 deletions

View File

@@ -111,6 +111,13 @@
#define Standard_ENABLE_DEPRECATION_WARNINGS
#endif
//! @def OCCT_NO_RVALUE_REFERENCE
//! Disables methods and constructors that use rvalue references
//! (C++11 move semantics) not supported by obsolete compilers.
#if (defined(_MSC_VER) && (_MSC_VER < 1600))
#define OCCT_NO_RVALUE_REFERENCE
#endif
# ifdef _WIN32
// We must be careful including windows.h: it is really poisonous stuff!