diff --git a/doc/api.rst b/doc/api.rst index 4b15385a..1e96e6a6 100644 --- a/doc/api.rst +++ b/doc/api.rst @@ -236,6 +236,8 @@ Then you can pass objects of type ``point`` to any formatting function:: You can also reuse existing formatters via inheritance or composition, for example:: + #include + enum class color {red, green, blue}; template <> struct fmt::formatter: formatter { @@ -264,7 +266,7 @@ will return ``" blue"``. You can also write a formatter for a hierarchy of classes:: #include - #include + #include struct A { virtual ~A() {}