Skip to content
forked from fmtlib/fmt

Commit

Permalink
Merge pull request #169 from fmtlib/master
Browse files Browse the repository at this point in the history
use simplified `void_t` for all compilers other than gcc 4.x (fmtlib#2160)
  • Loading branch information
sthagen authored Mar 3, 2021
2 parents cba337d + d8b9254 commit 6ededa9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/fmt/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {};
Expand Down

0 comments on commit 6ededa9

Please sign in to comment.