diff --git a/src/3rdparty/fmt/ranges.h b/src/3rdparty/fmt/ranges.h --- a/src/3rdparty/fmt/ranges.h +++ b/src/3rdparty/fmt/ranges.h @@ -1,13 +1,9 @@ -// Formatting library for C++ - experimental range support +// Formatting library for C++ - range and tuple support // -// Copyright (c) 2012 - present, Victor Zverovich +// Copyright (c) 2012 - present, Victor Zverovich and {fmt} contributors // All rights reserved. // // For the license information refer to format.h. -// -// Copyright (c) 2018 - present, Remotion (Igor Schulz) -// All Rights Reserved -// {fmt} support for ranges, containers and types tuple interface. #ifndef FMT_RANGES_H_ #define FMT_RANGES_H_ @@ -187,7 +183,7 @@ template using make_index_seq template struct integer_sequence { using value_type = T; - static FMT_CONSTEXPR size_t size() { return sizeof...(N); } + static FMT_CONSTEXPR auto size() -> size_t { return sizeof...(N); } }; template using index_sequence = integer_sequence; @@ -211,15 +207,15 @@ class is_tuple_formattable_ { }; template class is_tuple_formattable_ { template - static std::true_type check2(index_sequence, - integer_sequence); - static std::false_type check2(...); + static auto check2(index_sequence, + integer_sequence) -> std::true_type; + static auto check2(...) -> std::false_type; template - static decltype(check2( + static auto check(index_sequence) -> decltype(check2( index_sequence{}, - integer_sequence< - bool, (is_formattable::type, - C>::value)...>{})) check(index_sequence); + integer_sequence::type, + C>::value)...>{})); public: static constexpr const bool value = @@ -421,6 +417,12 @@ struct is_formattable_delayed #endif } // namespace detail +template struct conjunction : std::true_type {}; +template struct conjunction

: P {}; +template +struct conjunction + : conditional_t, P1> {}; + template struct range_formatter; @@ -486,7 +488,8 @@ struct range_formatter< for (; it != end; ++it) { if (i > 0) out = detail::copy_str(separator_, out); ctx.advance_to(out); - out = underlying_.format(mapper.map(*it), ctx); + auto&& item = *it; + out = underlying_.format(mapper.map(item), ctx); ++i; } out = detail::copy_str(closing_bracket_, out); @@ -668,8 +671,11 @@ template struct all } // namespace detail template -struct formatter::value>> +struct formatter< + T, Char, + enable_if_t, + bool_constant::value == + range_format::disabled>>::value>> : formatter, Char> { using all = detail::all; template