From 7e58af4eafc11c2b0f92abf111b0e198c9aa0dc7 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Fri, 12 Jan 2024 06:47:59 -0800 Subject: [PATCH] Fix an ICE on clang <= 15 --- include/fmt/base.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/include/fmt/base.h b/include/fmt/base.h index 0eab2feebf82..e39580849f99 100644 --- a/include/fmt/base.h +++ b/include/fmt/base.h @@ -1487,8 +1487,14 @@ constexpr unsigned long long make_descriptor() { : is_unpacked_bit | NUM_ARGS; } -// This type is intentionally undefined, only used for errors -template struct type_is_unformattable_for; +// This type is intentionally undefined, only used for errors. +template +#if FMT_CLANG_VERSION && FMT_CLANG_VERSION <= 1500 +// https://github.com/fmtlib/fmt/issues/3796 +struct type_is_unformattable_for {}; +#else +struct type_is_unformattable_for; +#endif template FMT_CONSTEXPR auto make_arg(T& val) -> value {