diff --git a/include/fmt/core.h b/include/fmt/core.h index 6862fc4b..2d657a8d 100644 --- a/include/fmt/core.h +++ b/include/fmt/core.h @@ -1352,32 +1352,16 @@ namespace detail { // A workaround for gcc 4.8 to make void_t work in a SFINAE context. template struct void_t_impl { using type = void; }; - template using void_t = typename detail::void_t_impl::type; -// Detect the iterator category of *any* given type in a SFINAE-friendly way. -// Unfortunately, older implementations of std::iterator_traits are not safe -// for use in a SFINAE-context. -template -struct iterator_category : std::false_type {}; - -template struct iterator_category { - using type = std::random_access_iterator_tag; -}; - -template -struct iterator_category> { - using type = typename It::iterator_category; -}; - template struct is_output_iterator : std::false_type {}; template struct is_output_iterator< It, T, - void_t::type, + void_t::iterator_category, decltype(*std::declval() = std::declval())>> : std::true_type {};