microfmt
Zero-allocation C++ formatting for constrained environments
Loading...
Searching...
No Matches
microfmt::enable_reflect_format< T > Struct Template Reference

Opt-in customization point for formatter<T> struct reflection. More...

#include <reflect_annotate.hpp>

Inheritance diagram for microfmt::enable_reflect_format< T >:
Inheritance graph
[legend]
Collaboration diagram for microfmt::enable_reflect_format< T >:
Collaboration graph
[legend]

Detailed Description

template<typename T>
struct microfmt::enable_reflect_format< T >

Opt-in customization point for formatter<T> struct reflection.

Specialize to std::true_type (or use the MICROFMT_REFLECT_FORMAT macro below) to enable automatic {name: value, ...} formatting of T's public non-static data members via reflection.hpp's live formatter. Left at the default std::false_type for every type unless explicitly opted in – mirroring Rust's #[derive(Debug)], which is likewise per-type opt-in rather than a blanket default (see reflection.hpp for why). This customization point exists, and is declared here rather than in reflection.hpp, precisely so a type can be opted in from a header that compiles under every toolchain.


The documentation for this struct was generated from the following file: