Utils: Activate copy constructor and assignment

The move only patter is quite powerful but has the drawback that some
STL algorithms get quite complicated. For short string or const references
should be not difference to a move. So we activate them for all cases.

Change-Id: I959c13796e69c45f31bb0ecbbe64a70d39961e3f
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
Marco Bubke
2017-01-09 14:24:39 +01:00
committed by Tim Jenssen
parent 8624e3c97d
commit 0011d81817

View File

@@ -155,10 +155,6 @@ public:
Memory::deallocate(m_data.allocated.data.pointer);
}
#if !defined(UNIT_TESTS) && !(defined(_MSC_VER) && _MSC_VER < 1900)
BasicSmallString(const BasicSmallString &other) = delete;
BasicSmallString &operator=(const BasicSmallString &other) = delete;
#else
BasicSmallString(const BasicSmallString &string)
{
if (string.isShortString() || string.isReadOnlyReference())
@@ -175,7 +171,6 @@ public:
return *this;
}
#endif
BasicSmallString(BasicSmallString &&other) noexcept
{