use simplified void_t for all compilers other than gcc 4.x (#2160)

This commit is contained in:
Alexey Ochapov 2021-03-03 01:42:27 +03:00 committed by GitHub
parent 835b910e7d
commit d8b9254301
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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 {};