Details
-
User Story
-
Resolution: Unresolved
-
P2: Important
-
None
-
None
-
None
-
21
-
Foundation Sprint 72, Foundation Sprint 73, Foundation Sprint 74, Foundation Sprint 75, Foundation Sprint 76, Foundation Sprint 77, Foundation Sprint 78, Foundations Sprint 79
Description
C++20 brings a new 3-way relational operator and three classes of comparison result: strong, partial, and weak ordering (cf. epic). We need an easy way to document
- the class of comparison result that applies to the type: strong, partial, weak
- which other types this type can be compared with
qdoc should then do the rest.
Example: QByteArray
\class QByteArray \stronglyordered \comparesto QByteArrayView, const char*, const char8_t*, ...
This is all a class author should need to do. Output should be something like:
class QByteArray This class is _strongly comparable_ (link to description). It can also be compared to <list or table> <add function documentation for each op in {==, !=, <, >, <=, >=, <=>}, complain if one is missing>
This is for less-than-comparable types. We'll need something similar for equality-comparable-non-less-than-comparable types, such as QRect:
\class QRect
\stronglyequalitycomparable
\comparesto QRectF
\class QRectF
\partiallyequalitycomparable
\comparesto QRect
Scope for this ticket is to finalize the concept and generate buy-in from the Documentation team and the qdoc maintainers for it.
Acceptance criteria:
- common understanding of the solution between Documentation team, qdoc team and C++ developers, incl. buy-in
- follow-up tasks defined for each of Documentation, qdoc, and C++ teams
Attachments
Issue Links
- is required for
-
QTBUG-104111 Modernize comparisons [Core: Date/Time]
- Open
-
QTBUG-104113 Modernize comparisons: can we provide macros?
- Open