3 ms·
> This makes it possible to use static_assert for instance with std::format... This is great but it sounds like it doesn't work for floats yet > For now, comp
by randusername 4mo ago
> This makes it possible to use static_assert for instance with std::format...
This is great but it sounds like it doesn't work for floats yet
> For now, compile-time std::format covers integers, strings, and diagnostics well, with floating-point support waiting on a separate paper (P3652) to make the floating-point <charconv> functions constexpr.
- leni536 4mo agoI am working on it. Floating-point IO is rather heavyweight, so the usual approach of naively slapping constexpr on all the things and putting them in headers can have some observable negative consequences on resource usage during compilation even if you don't use the new constexpr functionality. To the best of my knowledge fmtlib does implement constexpr formatting for float and double, but not long double.