Oh, C++11...
This commit is contained in:
parent
0203853868
commit
88bdd35b2e
@ -203,7 +203,7 @@ using make_index_sequence = make_integer_sequence<size_t, N>;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
using tuple_index_sequence = make_index_sequence<std::tuple_size_v<T>>;
|
using tuple_index_sequence = make_index_sequence<std::tuple_size<T>::value>;
|
||||||
|
|
||||||
template <typename T, bool = is_tuple_like_<T>::value>
|
template <typename T, bool = is_tuple_like_<T>::value>
|
||||||
struct is_tuple_formattable_ {
|
struct is_tuple_formattable_ {
|
||||||
@ -211,9 +211,14 @@ struct is_tuple_formattable_ {
|
|||||||
};
|
};
|
||||||
template <typename T> struct is_tuple_formattable_<T, true> {
|
template <typename T> struct is_tuple_formattable_<T, true> {
|
||||||
template <std::size_t... I>
|
template <std::size_t... I>
|
||||||
static std::integral_constant<
|
static std::true_type
|
||||||
bool, (fmt::is_formattable<std::tuple_element_t<I, T>>::value && ...)>
|
check2(index_sequence<I...>,integer_sequence<bool,(I == I)...>);
|
||||||
check(index_sequence<I...>);
|
static std::false_type
|
||||||
|
check2(...);
|
||||||
|
template <std::size_t... I>
|
||||||
|
static decltype(check2(index_sequence<I...>{},
|
||||||
|
integer_sequence<bool,(fmt::is_formattable<typename std::tuple_element<I, T>::type>::value)...>{}))
|
||||||
|
check(index_sequence<I...>);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static constexpr const bool value =
|
static constexpr const bool value =
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user