summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2017-04-20 11:53:06 +0200
committerMarc Mutz <marc.mutz@kdab.com>2017-04-21 05:00:54 +0000
commit6ac4f2ccefd71c01e3a7f48d4f73c389de53a6dc (patch)
tree681ac39b028f2b32ed2c2c75a50f5d7570633ba1
parent81ad7538612936be4fc87b0f768f08b1647de71a (diff)
QStringView: mark as primitive type
Every bit pattern of a QStringView is a Partially-Formed Object, and QStringViews are trivially copyable. That's what Q_PRIMITIVE_TYPE means, even if the docs are still talking about valid instead of partially-formed objects. Change-Id: I79d4f79fbab0ec2608620e88b6593e26686af304 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
-rw-r--r--src/corelib/tools/qstringview.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/tools/qstringview.h b/src/corelib/tools/qstringview.h
index 169a30ba69..22f20796f4 100644
--- a/src/corelib/tools/qstringview.h
+++ b/src/corelib/tools/qstringview.h
@@ -270,7 +270,7 @@ private:
qssize_t m_size;
const storage_type *m_data;
};
-Q_DECLARE_TYPEINFO(QStringView, Q_MOVABLE_TYPE);
+Q_DECLARE_TYPEINFO(QStringView, Q_PRIMITIVE_TYPE);
template <typename QStringLike, typename std::enable_if<
std::is_same<QStringLike, QString>::value || std::is_same<QStringLike, QStringRef>::value,