Hi,
I'd like to come upwith a requirement to support the combination of fmt with incomplete types, that have been specialized in formatter.
To clarify the use case, an example might help
class IncompleteType; namespace FmtHelper { fmt::appender FormatTo(fmt::appender out, IncompleteType const&); // resides in linked code }; namespace fmt { template <typename charT> struct formatter<IncompleteType, charT, void> { template <typename ctxT> constexpr auto parse(ctxT& ctx) -> decltype(ctx.begin()) { return ctx.begin(); } template <typename ctxT> constexpr auto format(IncompleteTypeconst& x, ctxT& ctx) noexcept { return FmtHelper::FormatTo(ctx.out(), x); } }; };
Rationale
IncompleteType
injects evil headers (i.e. WinApi or others).IncompleteType
is from a 3rdparty libIncompleteType
should be usable in headers in combination with fmt, without the need to have full type knowledge, thus usage is not in implementation files only.Limitations
fmt::appender
is enough and other overloads may be added, if requirements arise.Currently
Workaround
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4