Closed Arghnews closed 1 month ago
Thanks for the PR but I don't think this will work for formatter specializations and having this just for format_as
would be inconsistent. fmt::format
and std::format
already have an opt out mechanism for ranges.
What is the opt-out mechanism for a type if I don't want to include <fmt/ranges.h>
in the header where the type is defined?
You could probably forward declare is_range
but I would recommend including <fmt/ranges.h>
since you are effectively defining formatting for ranges.
Disable formatting type as range if user provided format_as function exists, using that instead. Should fix issue raised in #3839 by @drouhard
Edit: ah, this will need a similar workaround to
detail::is_formattable_delayed
for old msvc versions, before it will pass all the CI tests