mirror of
https://github.com/fmtlib/fmt.git
synced 2025-11-01 14:41:43 +01:00
Store types in ArgList instead of Arg
This commit is contained in:
@@ -67,7 +67,7 @@ int result;
|
||||
#define MAKE_TEST(func) \
|
||||
void func(const char *format, const fmt::ArgList &args) { \
|
||||
result = 0; \
|
||||
for (std::size_t i = 0, n = args.size(); i < n; ++i) \
|
||||
for (unsigned i = 0; args[i].type; ++i) \
|
||||
result += args[i].int_value; \
|
||||
}
|
||||
|
||||
@@ -98,7 +98,7 @@ struct S {};
|
||||
|
||||
int test_variadic(FMT_GEN(10, GET_TYPE), const fmt::ArgList &args) { \
|
||||
int result = 0; \
|
||||
for (std::size_t i = 0, n = args.size(); i < n; ++i) \
|
||||
for (std::size_t i = 0; args[i].type; ++i) \
|
||||
result += args[i].int_value; \
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user