From 0011d81817191c2b747fa1a8804bf21bccb83eab Mon Sep 17 00:00:00 2001 From: Marco Bubke Date: Mon, 9 Jan 2017 14:24:39 +0100 Subject: [PATCH] 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 --- src/libs/utils/smallstring.h | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/libs/utils/smallstring.h b/src/libs/utils/smallstring.h index 20617c11333..905520055f6 100644 --- a/src/libs/utils/smallstring.h +++ b/src/libs/utils/smallstring.h @@ -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 {