Details
-
User Story
-
Resolution: Fixed
-
P1: Critical
-
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, Foundations Sprint 80, Foundation Sprint 81, Foundation Sprint 82, Foundation Sprint 83, Foundation Sprint 84, Foundation Sprint 85, Foundation Sprint 86, Foundation Sprint 87, Foundation Sprint 88, Foundation Sprint 89, Foundation Sprint 90, Foundation Sprint 91, Foundation Sprint 92, Foundation Sprint 93, Foundations Sprint 94, Foundations Sprint 95, Foundations Sprint 96
-
3d3970d75 (dev), 575e9c7fa (dev), 24627d9bc (dev)
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-118432 C++20 support
- Closed
-
QTBUG-120305 Modernize comparisons [Core: Containers (ex strings)]
- In Progress
-
QTBUG-104111 Modernize comparisons [Core: Date/Time]
- Closed
-
QTBUG-104113 Modernize comparisons: can we provide macros?
- Closed
-
QTBUG-113234 Modernize comparisons [Core: QVariant]
- Closed
-
QTBUG-117660 Modernize comparisons [Core: Item Views]
- Closed
-
QTBUG-117661 Modernize comparisons [Core: Strings]
- Closed
-
QTBUG-120300 Modernize comparisons [Core: Serialization]
- Closed
-
QTBUG-120303 Modernize comparisons [Core: I/O]
- Closed
-
QTBUG-120304 Modernize comparisons [Core: <rest>]
- Closed
-
QTBUG-120306 Modernize comparisons [Core: Smart Pointers]
- Closed
-
QTBUG-120308 Modernize comparisons [Core: Geometric Classes]
- Closed
-
QTBUG-120359 Modernize comparisons [Core: QTypeRevision]
- Closed
-
QTBUG-120360 Modernize comparisons [Core: QOperatingSystemVersion]
- Closed
- resulted in
-
QTBUG-117912 QDoc: Implement COMMAND_COMPARISON
- Closed
-
QTBUG-117913 QDoc: Implement COMMAND_COMPARES
- Closed