Closed dixlorenz closed 1 week ago
I was looking at format_int and it seems to me that all the functions that it calls are constexpr in c++20. I tried simply prefixing everything in format_int with constexpr, now this compiles:
static_assert(fmt::format_int(DLCL::to_integral(42)).str() == "42");
Is there a reason format_int is not constexpr?
The only reason is that nobody was interested in making it constexpr yet. A PR would be welcome.
PR is up, I tried to match the code style as closely as I could see.
I was looking at format_int and it seems to me that all the functions that it calls are constexpr in c++20. I tried simply prefixing everything in format_int with constexpr, now this compiles:
static_assert(fmt::format_int(DLCL::to_integral(42)).str() == "42");
Is there a reason format_int is not constexpr?