From 2622cd23e69b67316cf678a97c268a874774c0e1 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Tue, 3 Jan 2023 16:19:34 -0800 Subject: [PATCH] Simplify arg_mapper --- include/fmt/core.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/include/fmt/core.h b/include/fmt/core.h index 9e4fe9cc..59ba21d1 100644 --- a/include/fmt/core.h +++ b/include/fmt/core.h @@ -1474,8 +1474,7 @@ template struct arg_mapper { !has_format_as::value && !has_formatter::value && !has_fallback_formatter::value)> FMT_DEPRECATED FMT_CONSTEXPR FMT_INLINE auto map(const T& val) - -> decltype(std::declval().map( - static_cast>(val))) { + -> decltype(this->map(static_cast>(val))) { return map(static_cast>(val)); } #endif @@ -1483,7 +1482,7 @@ template struct arg_mapper { template ::value && !has_formatter::value)> FMT_CONSTEXPR FMT_INLINE auto map(const T& val) - -> decltype(std::declval().map(format_as(T()))) { + -> decltype(this->map(format_as(T()))) { return map(format_as(val)); } @@ -1524,7 +1523,7 @@ template struct arg_mapper { template ::value)> FMT_CONSTEXPR FMT_INLINE auto map(const T& named_arg) - -> decltype(std::declval().map(named_arg.value)) { + -> decltype(this->map(named_arg.value)) { return map(named_arg.value); }