diff options
| -rw-r--r-- | src/corelib/text/qstringfwd.h | 1 | ||||
| -rw-r--r-- | src/corelib/text/qstringview.h | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/src/corelib/text/qstringfwd.h b/src/corelib/text/qstringfwd.h index 374a8ff3cbe..aefac03b416 100644 --- a/src/corelib/text/qstringfwd.h +++ b/src/corelib/text/qstringfwd.h @@ -36,6 +36,7 @@ class QLatin1String; using QLatin1StringView = QLatin1String; #endif class QString; +class QStringRef; // defined in qt5compat class QStringView; template <bool> class QBasicUtf8StringView; class QAnyStringView; diff --git a/src/corelib/text/qstringview.h b/src/corelib/text/qstringview.h index b050a9aef7c..454dd1fdad9 100644 --- a/src/corelib/text/qstringview.h +++ b/src/corelib/text/qstringview.h @@ -64,6 +64,8 @@ struct IsContainerCompatibleWithQStringView<T, std::enable_if_t<std::conjunction // These need to be treated specially due to the empty vs null distinction std::negation<std::is_same<std::decay_t<T>, QString>>, +#define QSTRINGVIEW_REFUSES_QSTRINGREF 1 + std::negation<std::is_same<q20::remove_cvref_t<T>, QStringRef>>, // QStringRef::op QStringView() // Don't make an accidental copy constructor std::negation<std::is_same<std::decay_t<T>, QStringView>> |
