Workaround 'cannot call member function without object' error on gcc 4.9

This commit is contained in:
Victor Zverovich 2020-03-11 17:29:07 -07:00
parent f72a905eb3
commit 3c24052cf1

View File

@ -950,8 +950,9 @@ template <typename Context> struct arg_mapper {
FMT_ENABLE_IF(std::is_enum<T>::value &&
!has_formatter<T, Context>::value &&
!has_fallback_formatter<T, Context>::value)>
FMT_CONSTEXPR auto map(const T& val) -> decltype(
map(static_cast<typename std::underlying_type<T>::type>(val))) {
FMT_CONSTEXPR auto map(const T& val)
-> decltype(std::declval<arg_mapper>().map(
static_cast<typename std::underlying_type<T>::type>(val))) {
return map(static_cast<typename std::underlying_type<T>::type>(val));
}
template <typename T,