Files
Victor Zverovich 0482001875 Format enums annotated with fmt::as_underlying
Format an enum as its underlying value if the enum is annotated with
fmt::as_underlying, the equivalent of std::format_as_underlying from P4267:

  enum class [[=fmt::as_underlying]] color { red = 1, green = 2, blue = 4 };
  fmt::format("{:04x}", color::blue);  // "0004"

The value is mapped before type erasure via the existing
formatter<T>::format_as hook, as in the std::byte formatter, so it is stored
as a builtin argument and can be used as dynamic width or precision.
Combining the annotation with fmt::as_identifiers is rejected with a
static_assert.
2026-09-26 11:07:11 -07:00
..
2026-09-09 14:41:50 -07:00
2024-06-01 09:37:32 -07:00
2026-09-07 17:11:35 -07:00
2024-06-04 15:26:38 -07:00