Mateusz Pusz
Mateusz Pusz
In fact, after closely reviewing all our examples, the only place where `zero` could be used was here: ```diff template struct MP_UNITS_STD_FMT::formatter : formatter { template auto format(geographic::latitude lat, FormatContext&...
Maybe just our short examples are not representing the production code base well enough? In bigger projects people will have quantity types stored in some structures and not deduced by...
As I am puzzled about what to do with this feature, I pushed it to PR #488 so you can assess the benefits and changes required to implement it. Please...
> As for the second example, it wasn't clear to me why zero wouldn't be able to replace 0 * si::metre. If we replace `0 * si::metre` with `zero`, then...
> I grepped our codebase for \bZERO\b in C++ files and found over a thousand results. There were a few false positives, but most of them were true positives: either...
I have just learned the following: https://godbolt.org/z/689Wa188h. We can treat literal `0` as a special value not being an `int`. Can we somehow benefit from that in the features discussed...
Isn't it portably implemented for comparison categories?
https://cplusplus.github.io/LWG/issue4051
Nearly all `` functions will be `constexpr` in either C++23 (https://wg21.link/P0533R9) or C++26 (https://wg21.link/P1383R2), and I think that a few compilers already implement it this way. We just need a...
> and provide a "hand rolled" alternative for those who don't have it or do `std::terminate` like we are doing right now.