From cd5b5670bad50e47e36620fb2b7bea6ee55ce578 Mon Sep 17 00:00:00 2001 From: Dror Levin Date: Tue, 5 Jun 2018 22:42:26 +0300 Subject: [PATCH] Make is_range and is_tuple_like public API, fix #751 --- include/fmt/ranges.h | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/include/fmt/ranges.h b/include/fmt/ranges.h index a235ecac..770f43b7 100644 --- a/include/fmt/ranges.h +++ b/include/fmt/ranges.h @@ -100,12 +100,6 @@ struct is_range_().end())>, void>::type> : std::true_type {}; -template -struct is_range { - static FMT_CONSTEXPR_DECL const bool value = - is_range_::value && !is_like_std_string::value; -}; - /// tuple_size and tuple_element check. template class is_tuple_like_ { @@ -121,12 +115,6 @@ class is_tuple_like_ { !std::is_void(FMT_NULL))>::value; }; -template -struct is_tuple_like { - static FMT_CONSTEXPR_DECL const bool value = - is_tuple_like_::value && !is_range_::value; -}; - // Check for integer_sequence #if defined(__cpp_lib_integer_sequence) || FMT_MSC_VER >= 1900 template @@ -176,9 +164,15 @@ void for_each(Tuple &&tup, F &&f) { } } // namespace internal +template +struct is_tuple_like { + static FMT_CONSTEXPR_DECL const bool value = + internal::is_tuple_like_::value && !internal::is_range_::value; +}; + template struct formatter::value>::type> { + typename std::enable_if::value>::type> { private: // C++11 generic lambda for format() template @@ -228,9 +222,15 @@ public: } }; +template +struct is_range { + static FMT_CONSTEXPR_DECL const bool value = + internal::is_range_::value && !internal::is_like_std_string::value; +}; + template struct formatter::value>::type> { + typename std::enable_if::value>::type> { formatting_range formatting;