0029258: Foundation Classes - provide move constructors for string classes
authorkgv <kgv@opencascade.com>
Sun, 15 Oct 2017 13:08:01 +0000 (16:08 +0300)
committerbugmaster <bugmaster@opencascade.com>
Thu, 9 Nov 2017 15:08:07 +0000 (18:08 +0300)
commit6286195cffb594a0c3a413fa4a0fef56f552448d
tree43fcc4323ba5220744cf9eaea930af9dceadb8af
parent4ecf34cce7d5ea995a2ce1d35ffa91790fc42aa1
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.
src/NCollection/NCollection_Array1.hxx
src/NCollection/NCollection_UtfString.hxx
src/NCollection/NCollection_UtfString.lxx
src/QANCollection/QANCollection_Test.cxx
src/Standard/Standard_Macro.hxx
src/TCollection/TCollection_AsciiString.cxx
src/TCollection/TCollection_AsciiString.hxx
src/TCollection/TCollection_ExtendedString.cxx
src/TCollection/TCollection_ExtendedString.hxx