From 12f468388384846c35cc9151c4b860fbfa80ab71 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Thu, 13 Jun 2019 21:32:58 -0700 Subject: [PATCH] Make iterator_t an alias template --- include/fmt/format.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/include/fmt/format.h b/include/fmt/format.h index e0edd3f6..d6130983 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -266,9 +266,8 @@ inline Dest bit_cast(const Source& source) { } // An implementation of iterator_t for pre-C++20 systems. -template struct iterator_t { - typedef decltype(std::begin(std::declval())) type; -}; +template +using iterator_t = decltype(std::begin(std::declval())); template typename Allocator::value_type* allocate(Allocator& alloc, std::size_t n) { @@ -3313,13 +3312,13 @@ arg_join join(It begin, It end, wstring_view sep) { \endrst */ template -arg_join::type, char> join( +arg_join, char> join( const Range& range, string_view sep) { return join(std::begin(range), std::end(range), sep); } template -arg_join::type, wchar_t> join( +arg_join, wchar_t> join( const Range& range, wstring_view sep) { return join(std::begin(range), std::end(range), sep); }