mirror of
https://github.com/fmtlib/fmt.git
synced 2025-11-30 14:19:30 +01:00
Fix handling of empty tuples (#1588)
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
#define FMT_RANGES_H_
|
||||
|
||||
#include <type_traits>
|
||||
|
||||
#include "format.h"
|
||||
|
||||
// output only up to N items from the range.
|
||||
@@ -104,10 +105,7 @@ struct is_range_<
|
||||
/// tuple_size and tuple_element check.
|
||||
template <typename T> class is_tuple_like_ {
|
||||
template <typename U>
|
||||
static auto check(U* p)
|
||||
-> decltype(std::tuple_size<U>::value,
|
||||
(void)std::declval<typename std::tuple_element<0, U>::type>(),
|
||||
int());
|
||||
static auto check(U* p) -> decltype(std::tuple_size<U>::value, int());
|
||||
template <typename> static void check(...);
|
||||
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user