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>
This commit is contained in:
parent
81ad753861
commit
6ac4f2ccef
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user