criterion
criterion copied to clipboard
Compile fails with clang 16 C++20
[ 98%] Built target unittests
In file included from /home/davidd/prog/uri/examples/benchmarks.cpp:36:
In file included from /home/davidd/prog/uri/build/_deps/criterion-src/include/criterion/criterion.hpp:11:
In file included from /home/davidd/prog/uri/build/_deps/criterion-src/include/criterion/details/main.hpp:9:
/home/davidd/prog/uri/build/_deps/criterion-src/include/criterion/details/structopt.hpp:1106:47: fatal error: instantiating fold expression with 257 arguments exceeded expression nesting limit of 256
constexpr int count = ((valid[I] ? 1 : 0) + ...);
~~~~~~~~~~~~~~~~~~~~~~^~~~
/home/davidd/prog/uri/build/_deps/criterion-src/include/criterion/details/structopt.hpp:1119:34: note: in instantiation of function template specialization 'magic_enum::detail::values<criterion::options::export_options::format_type, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256>' requested here
inline constexpr auto values_v = values<E>(
^
/home/davidd/prog/uri/build/_deps/criterion-src/include/criterion/details/structopt.hpp:1122:62: note: in instantiation of variable template specialization 'magic_enum::detail::values_v' requested here
template <typename E> inline constexpr std::size_t count_v = values_v<E>.size();
^
/home/davidd/prog/uri/build/_deps/criterion-src/include/criterion/details/structopt.hpp:1401:25: note: in instantiation of variable template specialization 'magic_enum::detail::count_vcriterion::options::export_options::format_type' requested here
static_assert(detail::count_v<D>> 0,
^
/home/davidd/prog/uri/build/_deps/criterion-src/include/criterion/details/structopt.hpp:2566:41: note: in instantiation of function template specialization 'magic_enum::enum_castcriterion::options::export_options::format_type' requested here
auto maybe_enum_value = magic_enum::enum_cast<T>(arguments[next_index]);
^
/home/davidd/prog/uri/build/_deps/criterion-src/include/criterion/details/structopt.hpp:2213:16: note: in instantiation of function template specialization 'structopt::details::parser::parse_enum_argumentcriterion::options::export_options::format_type' requested here
result = parse_enum_argument<T>(name);
^
/home/davidd/prog/uri/build/_deps/criterion-src/include/criterion/details/structopt.hpp:2648:31: note: (skipping 3 contexts in backtrace; use -ftemplate-backtrace-limit=0 to see all)
auto [value, success] = parse_argument<T>(field_name.c_str());
^
/home/davidd/prog/uri/build/_deps/criterion-src/include/criterion/details/structopt.hpp:2248:31: note: in instantiation of function template specialization 'structopt::details::parser::parse_argumentcriterion::options::export_options' requested here
auto [value, success] = parse_argument<T>(name);
^
/home/davidd/prog/uri/build/_deps/criterion-src/include/criterion/details/structopt.hpp:2701:19: note: in instantiation of function template specialization 'structopt::details::parser::parse_optional_argumentcriterion::options::export_options' requested here
value = parse_optional_argument<typename T::value_type>(name);
^
/home/davidd/prog/uri/build/_deps/criterion-src/include/criterion/details/main.hpp:61:1: note: in instantiation of function template specialization 'structopt::details::parser::operator()<std::optionalcriterion::options::export_options>' requested here
STRUCTOPT(criterion::options, warmup, list, list_filtered, run_filtered, export_results, quiet,
^
/home/davidd/prog/uri/build/_deps/criterion-src/include/criterion/details/structopt.hpp:2860:19: note: expanded from macro 'STRUCTOPT'
#define STRUCTOPT VISITABLE_STRUCT
^
/home/davidd/prog/uri/build/_deps/criterion-src/include/criterion/details/structopt.hpp:793:27: note: expanded from macro 'VISITABLE_STRUCT'
VISIT_STRUCT_PP_MAP(VISIT_STRUCT_MEMBER_HELPER, VA_ARGS)
^
/home/davidd/prog/uri/build/_deps/criterion-src/include/criterion/details/structopt.hpp:2929:12: note: in instantiation of function template specialization 'structopt::app::parsecriterion::options' requested here
return parse<T>(arguments);
^
/home/davidd/prog/uri/build/_deps/criterion-src/include/criterion/details/main.hpp:75:49: note: in instantiation of function template specialization 'structopt::app::parsecriterion::options' requested here
auto options = structopt::app(program_name).parsecriterion::options(argc, argv);
^
/home/davidd/prog/uri/build/_deps/criterion-src/include/criterion/details/structopt.hpp:1106:47: note: use -fbracket-depth=N to increase maximum nesting level
constexpr int count = ((valid[I] ? 1 : 0) + ...);
^
1 error generated.
make[2]: *** [CMakeFiles/benchmarks.dir/build.make:76: CMakeFiles/benchmarks.dir/examples/benchmarks.cpp.o] Error 1