use simplified void_t for all compilers other than gcc 4.x

This commit is contained in:
Alexey Ochapov 2021-03-01 23:18:07 +03:00
parent 835b910e7d
commit 2db69c7fd2
No known key found for this signature in database
GPG Key ID: 9DC52E8F031B8DA8

View File

@ -1379,10 +1379,14 @@ template <typename T> struct formattable : std::false_type {};
namespace detail {
#if FMT_GCC_VERSION && FMT_GCC_VERSION < 500
// A workaround for gcc 4.8 to make void_t work in a SFINAE context.
template <typename... Ts> struct void_t_impl { using type = void; };
template <typename... Ts>
using void_t = typename detail::void_t_impl<Ts...>::type;
#else
template <typename...> using void_t = void;
#endif
template <typename It, typename T, typename Enable = void>
struct is_output_iterator : std::false_type {};