Details
-
User Story
-
Resolution: Fixed
-
P3: Somewhat important
-
None
-
None
-
5
-
Foundation Sprint 107, Foundation Sprint 108, Foundation Sprint 109
-
df91ed914 (dev), ffac33964 (dev), 334d4c7b6 (dev), cf9b8b463 (dev), 9e7303700 (dev)
Description
TL;DR: see epic for up-to-date implementation advice
We come from the near future and are porting our code to the new C++20 std::format library. We also use Qt, and have so far just written the std::formatter's ourselves, but a certain mmutz tells us that we mustn't, because we control neither the Qt types nor the std ones. And just as we were absorbing this advice, all hell broke lose when we added a new 3rd-party library that also added std::formatter<qfloat16, ~~~>
So, we have concluded that it's your job, dear Qt people, to provide these std::formatter specialisations for all the Qt types.
This ticket is for the Qt arithmetic types, of which there's only one, afaict, qfloat16. Will write other tickets for other Qt types.
Acceptance criteria:
- qfloat16 works in std::format the same way as double, float, long double do
Attachments
For Gerrit Dashboard: QTBUG-104654 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
560619,10 | Add std::format support for qfloat16 | dev | qt/qtbase | Status: MERGED | +2 | 0 |
560878,10 | Detect if std::formatter for qfloat16::NearestFloat exists | dev | qt/qtbase | Status: MERGED | +2 | 0 |
569649,4 | qfloat16format.h: fix compilation | dev | qt/qtbase | Status: MERGED | +2 | 0 |
569999,1 | qfloat16format.h: fix compilation | 6.8 | qt/qtbase | Status: ABANDONED | 0 | 0 |
570017,6 | Only include <format> if __cpp_lib_format is defined | dev | qt/qtbase | Status: MERGED | +2 | 0 |
570100,1 | Only include <format> if __cpp_lib_format is defined | 6.8 | qt/qtbase | Status: ABANDONED | 0 | 0 |
589600,5 | Merge qfloat16format.h into qfloat16.h | dev | qt/qtbase | Status: MERGED | +2 | 0 |