diff options
| author | Stefan Boberg <[email protected]> | 2026-03-20 09:16:26 +0100 |
|---|---|---|
| committer | Stefan Boberg <[email protected]> | 2026-03-20 09:16:26 +0100 |
| commit | 2aeddc7f596bf0c2756e8689440157338981fd73 (patch) | |
| tree | 5cb07b2433815790243defe50270353bdbd6df08 /src/zenhttp/httpserver.cpp | |
| parent | add missing HTTP response codes (diff) | |
| download | zen-2aeddc7f596bf0c2756e8689440157338981fd73.tar.xz zen-2aeddc7f596bf0c2756e8689440157338981fd73.zip | |
Add generic fmt::formatter for types with free ToString functions
Add a HasFreeToString concept that detects types with a free
ToString(T) function returning a string-like type, and a
corresponding fmt::formatter partial specialization. This eliminates
the need for int() casts or explicit ToString() calls when formatting
enums like HttpResponseCode, SessionState, etc.
Convert compute-tests.cpp to use the new formatter directly instead
of int() casts for HTTP response codes.
Diffstat (limited to 'src/zenhttp/httpserver.cpp')
0 files changed, 0 insertions, 0 deletions