From 3c24052cf17e23a285316ac52178935599ad6a47 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Wed, 11 Mar 2020 17:29:07 -0700 Subject: [PATCH] Workaround 'cannot call member function without object' error on gcc 4.9 --- include/fmt/core.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/fmt/core.h b/include/fmt/core.h index 72bbddad..8bcc0d06 100644 --- a/include/fmt/core.h +++ b/include/fmt/core.h @@ -950,8 +950,9 @@ template struct arg_mapper { FMT_ENABLE_IF(std::is_enum::value && !has_formatter::value && !has_fallback_formatter::value)> - FMT_CONSTEXPR auto map(const T& val) -> decltype( - map(static_cast::type>(val))) { + FMT_CONSTEXPR auto map(const T& val) + -> decltype(std::declval().map( + static_cast::type>(val))) { return map(static_cast::type>(val)); } template