aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabian Kosmale <fabian.kosmale@qt.io>2021-11-02 14:54:25 +0100
committerFabian Kosmale <fabian.kosmale@qt.io>2021-11-03 00:06:53 +0100
commit3a26e70e8ae8541e6f7bf0f0c86063fbaa6d01cf (patch)
treec07aa0e1844ecc3f5bb5c577ac5ca596d7335b9f
parent3d8fe66f493f650d6dafb337105ef20645cd7ee2 (diff)
QBiPointer: Add internal documentation
Change-Id: I9269ca95694866dde1389ff3e5396d6a94eaa386 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
-rw-r--r--src/qml/qml/ftw/qflagpointer_p.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/qml/qml/ftw/qflagpointer_p.h b/src/qml/qml/ftw/qflagpointer_p.h
index c8824f3866..3d1de3c136 100644
--- a/src/qml/qml/ftw/qflagpointer_p.h
+++ b/src/qml/qml/ftw/qflagpointer_p.h
@@ -66,6 +66,16 @@ template <> struct QFlagPointerAlignment<void>
};
}
+/*!
+ \internal
+ \class template<typename T1, typename T2> QBiPointer<T1, T2>
+
+ \short QBiPointer can be thought of as a space-optimized std::variant<T1*, T2*>
+ with a nicer API to check the active pointer. Its other main feature is that
+ it only requires sizeof(void *) space.
+
+ \note It can also store one additional flag for a user defined purpose.
+ */
template<typename T, typename T2>
class QBiPointer {
public: