From 7690be8ec05cb350d9284564b51d12df2e4c78ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole=20B=C3=B8e?= <94781160+cptFracassa@users.noreply.github.com> Date: Mon, 13 Nov 2023 13:31:32 +0100 Subject: [PATCH] fix: support optional with format_as(T) Formatting a std::optional where T had a custom format_as(T) function failed to compile with clang, due to set_debug_format being hidden by private inheritance. This fix makes the function available through a using clause. --- include/fmt/format.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/fmt/format.h b/include/fmt/format.h index 4104d91fc7cd3..f34c97b11c742 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -4053,6 +4053,7 @@ struct formatter::value>> : private formatter, Char> { using base = formatter, Char>; using base::parse; + using base::set_debug_format; template auto format(const T& value, FormatContext& ctx) const -> decltype(ctx.out()) {