From 1f85fb21f2cf4c740f6a5cb03729b302a80d6bfe Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 6 Jun 2023 14:43:55 -0700 Subject: [PATCH] [metadata] Improve codegen for name lookups (#33237) The approach of doing a recursive function call to expand the if checks for known metadata names was tripping up an optimization clang has to collapse that if/then tree into an optimized tree search over the set of known strings. By unrolling that loop (with a code generator) we start to present a pattern that clang *can* recognize, and hopefully get some more stable and faster code generation as a benefit. --------- Co-authored-by: ctiller --- BUILD | 2 + CMakeLists.txt | 37 + build_autogenerated.yaml | 19 + gRPC-C++.podspec | 4 + gRPC-Core.podspec | 4 + grpc.gemspec | 2 + package.xml | 2 + src/core/BUILD | 20 + src/core/lib/gprpp/if_list.h | 4530 +++++++++++++++++++++++ src/core/lib/gprpp/sorted_pack.h | 15 +- src/core/lib/gprpp/type_list.h | 32 + src/core/lib/transport/metadata_batch.h | 69 +- test/core/gprpp/BUILD | 12 + test/core/gprpp/if_list_test.cc | 37 + tools/codegen/core/gen_if_list.py | 76 + tools/doxygen/Doxyfile.c++.internal | 2 + tools/doxygen/Doxyfile.core.internal | 2 + tools/run_tests/generated/tests.json | 24 + 18 files changed, 4848 insertions(+), 41 deletions(-) create mode 100644 src/core/lib/gprpp/if_list.h create mode 100644 src/core/lib/gprpp/type_list.h create mode 100644 test/core/gprpp/if_list_test.cc create mode 100755 tools/codegen/core/gen_if_list.py diff --git a/BUILD b/BUILD index 6396b78fd09..23e55e2beb1 100644 --- a/BUILD +++ b/BUILD @@ -1550,6 +1550,7 @@ grpc_cc_library( "//src/core:grpc_sockaddr", "//src/core:http2_errors", "//src/core:if", + "//src/core:if_list", "//src/core:init_internally", "//src/core:iomgr_fwd", "//src/core:iomgr_port", @@ -1589,6 +1590,7 @@ grpc_cc_library( "//src/core:transport_fwd", "//src/core:try_join", "//src/core:try_seq", + "//src/core:type_list", "//src/core:useful", "//src/core:windows_event_engine", "//src/core:windows_event_engine_listener", diff --git a/CMakeLists.txt b/CMakeLists.txt index 72c8c1f982e..2b139832c25 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1027,6 +1027,7 @@ if(gRPC_BUILD_TESTS) endif() add_dependencies(buildtests_cxx hybrid_end2end_test) add_dependencies(buildtests_cxx idle_filter_state_test) + add_dependencies(buildtests_cxx if_list_test) add_dependencies(buildtests_cxx if_test) add_dependencies(buildtests_cxx init_test) add_dependencies(buildtests_cxx initial_settings_frame_bad_client_test) @@ -13940,6 +13941,42 @@ target_link_libraries(idle_filter_state_test ) +endif() +if(gRPC_BUILD_TESTS) + +add_executable(if_list_test + test/core/gprpp/if_list_test.cc + third_party/googletest/googletest/src/gtest-all.cc + third_party/googletest/googlemock/src/gmock-all.cc +) +target_compile_features(if_list_test PUBLIC cxx_std_14) +target_include_directories(if_list_test + PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/include + ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} + ${_gRPC_SSL_INCLUDE_DIR} + ${_gRPC_UPB_GENERATED_DIR} + ${_gRPC_UPB_GRPC_GENERATED_DIR} + ${_gRPC_UPB_INCLUDE_DIR} + ${_gRPC_XXHASH_INCLUDE_DIR} + ${_gRPC_ZLIB_INCLUDE_DIR} + third_party/googletest/googletest/include + third_party/googletest/googletest + third_party/googletest/googlemock/include + third_party/googletest/googlemock + ${_gRPC_PROTO_GENS_DIR} +) + +target_link_libraries(if_list_test + ${_gRPC_BASELIB_LIBRARIES} + ${_gRPC_PROTOBUF_LIBRARIES} + ${_gRPC_ZLIB_LIBRARIES} + ${_gRPC_ALLTARGETS_LIBRARIES} +) + + endif() if(gRPC_BUILD_TESTS) diff --git a/build_autogenerated.yaml b/build_autogenerated.yaml index fd6adcf5542..843c3a1f42c 100644 --- a/build_autogenerated.yaml +++ b/build_autogenerated.yaml @@ -733,6 +733,7 @@ libs: - src/core/lib/gprpp/chunked_vector.h - src/core/lib/gprpp/cpp_impl_of.h - src/core/lib/gprpp/dual_ref_counted.h + - src/core/lib/gprpp/if_list.h - src/core/lib/gprpp/load_file.h - src/core/lib/gprpp/manual_constructor.h - src/core/lib/gprpp/match.h @@ -749,6 +750,7 @@ libs: - src/core/lib/gprpp/table.h - src/core/lib/gprpp/time.h - src/core/lib/gprpp/time_averaged_stats.h + - src/core/lib/gprpp/type_list.h - src/core/lib/gprpp/unique_type_name.h - src/core/lib/gprpp/validation_errors.h - src/core/lib/gprpp/work_serializer.h @@ -2112,6 +2114,7 @@ libs: - src/core/lib/gprpp/chunked_vector.h - src/core/lib/gprpp/cpp_impl_of.h - src/core/lib/gprpp/dual_ref_counted.h + - src/core/lib/gprpp/if_list.h - src/core/lib/gprpp/load_file.h - src/core/lib/gprpp/manual_constructor.h - src/core/lib/gprpp/match.h @@ -2128,6 +2131,7 @@ libs: - src/core/lib/gprpp/table.h - src/core/lib/gprpp/time.h - src/core/lib/gprpp/time_averaged_stats.h + - src/core/lib/gprpp/type_list.h - src/core/lib/gprpp/unique_type_name.h - src/core/lib/gprpp/validation_errors.h - src/core/lib/gprpp/work_serializer.h @@ -3608,6 +3612,7 @@ libs: - src/core/lib/gprpp/chunked_vector.h - src/core/lib/gprpp/cpp_impl_of.h - src/core/lib/gprpp/dual_ref_counted.h + - src/core/lib/gprpp/if_list.h - src/core/lib/gprpp/load_file.h - src/core/lib/gprpp/manual_constructor.h - src/core/lib/gprpp/match.h @@ -3623,6 +3628,7 @@ libs: - src/core/lib/gprpp/table.h - src/core/lib/gprpp/time.h - src/core/lib/gprpp/time_averaged_stats.h + - src/core/lib/gprpp/type_list.h - src/core/lib/gprpp/unique_type_name.h - src/core/lib/gprpp/validation_errors.h - src/core/lib/gprpp/work_serializer.h @@ -7552,6 +7558,7 @@ targets: - src/core/lib/gprpp/chunked_vector.h - src/core/lib/gprpp/cpp_impl_of.h - src/core/lib/gprpp/dual_ref_counted.h + - src/core/lib/gprpp/if_list.h - src/core/lib/gprpp/load_file.h - src/core/lib/gprpp/manual_constructor.h - src/core/lib/gprpp/match.h @@ -7567,6 +7574,7 @@ targets: - src/core/lib/gprpp/table.h - src/core/lib/gprpp/time.h - src/core/lib/gprpp/time_averaged_stats.h + - src/core/lib/gprpp/type_list.h - src/core/lib/gprpp/unique_type_name.h - src/core/lib/gprpp/validation_errors.h - src/core/lib/gprpp/work_serializer.h @@ -8913,6 +8921,16 @@ targets: - test/core/client_idle/idle_filter_state_test.cc deps: [] uses_polling: false +- name: if_list_test + gtest: true + build: test + language: c++ + headers: + - src/core/lib/gprpp/if_list.h + src: + - test/core/gprpp/if_list_test.cc + deps: [] + uses_polling: false - name: if_test gtest: true build: test @@ -11318,6 +11336,7 @@ targets: language: c++ headers: - src/core/lib/gprpp/sorted_pack.h + - src/core/lib/gprpp/type_list.h src: - test/core/gprpp/sorted_pack_test.cc deps: [] diff --git a/gRPC-C++.podspec b/gRPC-C++.podspec index 7ae2deadced..3c2bf03332d 100644 --- a/gRPC-C++.podspec +++ b/gRPC-C++.podspec @@ -818,6 +818,7 @@ Pod::Spec.new do |s| 'src/core/lib/gprpp/examine_stack.h', 'src/core/lib/gprpp/fork.h', 'src/core/lib/gprpp/host_port.h', + 'src/core/lib/gprpp/if_list.h', 'src/core/lib/gprpp/load_file.h', 'src/core/lib/gprpp/manual_constructor.h', 'src/core/lib/gprpp/match.h', @@ -843,6 +844,7 @@ Pod::Spec.new do |s| 'src/core/lib/gprpp/time.h', 'src/core/lib/gprpp/time_averaged_stats.h', 'src/core/lib/gprpp/time_util.h', + 'src/core/lib/gprpp/type_list.h', 'src/core/lib/gprpp/unique_type_name.h', 'src/core/lib/gprpp/validation_errors.h', 'src/core/lib/gprpp/work_serializer.h', @@ -1856,6 +1858,7 @@ Pod::Spec.new do |s| 'src/core/lib/gprpp/examine_stack.h', 'src/core/lib/gprpp/fork.h', 'src/core/lib/gprpp/host_port.h', + 'src/core/lib/gprpp/if_list.h', 'src/core/lib/gprpp/load_file.h', 'src/core/lib/gprpp/manual_constructor.h', 'src/core/lib/gprpp/match.h', @@ -1881,6 +1884,7 @@ Pod::Spec.new do |s| 'src/core/lib/gprpp/time.h', 'src/core/lib/gprpp/time_averaged_stats.h', 'src/core/lib/gprpp/time_util.h', + 'src/core/lib/gprpp/type_list.h', 'src/core/lib/gprpp/unique_type_name.h', 'src/core/lib/gprpp/validation_errors.h', 'src/core/lib/gprpp/work_serializer.h', diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index 6402ef63887..20e682b4184 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -1298,6 +1298,7 @@ Pod::Spec.new do |s| 'src/core/lib/gprpp/fork.h', 'src/core/lib/gprpp/host_port.cc', 'src/core/lib/gprpp/host_port.h', + 'src/core/lib/gprpp/if_list.h', 'src/core/lib/gprpp/linux/env.cc', 'src/core/lib/gprpp/load_file.cc', 'src/core/lib/gprpp/load_file.h', @@ -1336,6 +1337,7 @@ Pod::Spec.new do |s| 'src/core/lib/gprpp/time_averaged_stats.h', 'src/core/lib/gprpp/time_util.cc', 'src/core/lib/gprpp/time_util.h', + 'src/core/lib/gprpp/type_list.h', 'src/core/lib/gprpp/unique_type_name.h', 'src/core/lib/gprpp/validation_errors.cc', 'src/core/lib/gprpp/validation_errors.h', @@ -2583,6 +2585,7 @@ Pod::Spec.new do |s| 'src/core/lib/gprpp/examine_stack.h', 'src/core/lib/gprpp/fork.h', 'src/core/lib/gprpp/host_port.h', + 'src/core/lib/gprpp/if_list.h', 'src/core/lib/gprpp/load_file.h', 'src/core/lib/gprpp/manual_constructor.h', 'src/core/lib/gprpp/match.h', @@ -2608,6 +2611,7 @@ Pod::Spec.new do |s| 'src/core/lib/gprpp/time.h', 'src/core/lib/gprpp/time_averaged_stats.h', 'src/core/lib/gprpp/time_util.h', + 'src/core/lib/gprpp/type_list.h', 'src/core/lib/gprpp/unique_type_name.h', 'src/core/lib/gprpp/validation_errors.h', 'src/core/lib/gprpp/work_serializer.h', diff --git a/grpc.gemspec b/grpc.gemspec index 7e5b9a3da5c..75fbdb3c150 100644 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -1204,6 +1204,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/gprpp/fork.h ) s.files += %w( src/core/lib/gprpp/host_port.cc ) s.files += %w( src/core/lib/gprpp/host_port.h ) + s.files += %w( src/core/lib/gprpp/if_list.h ) s.files += %w( src/core/lib/gprpp/linux/env.cc ) s.files += %w( src/core/lib/gprpp/load_file.cc ) s.files += %w( src/core/lib/gprpp/load_file.h ) @@ -1242,6 +1243,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/gprpp/time_averaged_stats.h ) s.files += %w( src/core/lib/gprpp/time_util.cc ) s.files += %w( src/core/lib/gprpp/time_util.h ) + s.files += %w( src/core/lib/gprpp/type_list.h ) s.files += %w( src/core/lib/gprpp/unique_type_name.h ) s.files += %w( src/core/lib/gprpp/validation_errors.cc ) s.files += %w( src/core/lib/gprpp/validation_errors.h ) diff --git a/package.xml b/package.xml index 142fcbab936..aeee9771a7c 100644 --- a/package.xml +++ b/package.xml @@ -1186,6 +1186,7 @@ + @@ -1224,6 +1225,7 @@ + diff --git a/src/core/BUILD b/src/core/BUILD index 409747855be..85472b4dc38 100644 --- a/src/core/BUILD +++ b/src/core/BUILD @@ -2764,6 +2764,26 @@ grpc_cc_library( "lib/gprpp/sorted_pack.h", ], language = "c++", + deps = [ + "type_list", + "//:gpr_platform", + ], +) + +grpc_cc_library( + name = "type_list", + hdrs = [ + "lib/gprpp/type_list.h", + ], + language = "c++", +) + +grpc_cc_library( + name = "if_list", + hdrs = [ + "lib/gprpp/if_list.h", + ], + language = "c++", deps = ["//:gpr_platform"], ) diff --git a/src/core/lib/gprpp/if_list.h b/src/core/lib/gprpp/if_list.h new file mode 100644 index 00000000000..a06847423fd --- /dev/null +++ b/src/core/lib/gprpp/if_list.h @@ -0,0 +1,4530 @@ +// Copyright 2023 gRPC authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// +// Automatically generated by tools/codegen/core/gen_if_list.py +// + +#ifndef GRPC_SRC_CORE_LIB_GPRPP_IF_LIST_H +#define GRPC_SRC_CORE_LIB_GPRPP_IF_LIST_H + +#include + +namespace grpc_core { + +template +auto IfList(CheckArg input, ActionArg action_arg, ActionFail action_fail, + Check0 check0, Action0 action0) { + if (check0(input)) return action0(action_arg); + return action_fail(action_arg); +} + +template +auto IfList(CheckArg input, ActionArg action_arg, ActionFail action_fail, + Check0 check0, Check1 check1, Action0 action0, Action1 action1) { + if (check0(input)) return action0(action_arg); + if (check1(input)) return action1(action_arg); + return action_fail(action_arg); +} + +template +auto IfList(CheckArg input, ActionArg action_arg, ActionFail action_fail, + Check0 check0, Check1 check1, Check2 check2, Action0 action0, + Action1 action1, Action2 action2) { + if (check0(input)) return action0(action_arg); + if (check1(input)) return action1(action_arg); + if (check2(input)) return action2(action_arg); + return action_fail(action_arg); +} + +template +auto IfList(CheckArg input, ActionArg action_arg, ActionFail action_fail, + Check0 check0, Check1 check1, Check2 check2, Check3 check3, + Action0 action0, Action1 action1, Action2 action2, + Action3 action3) { + if (check0(input)) return action0(action_arg); + if (check1(input)) return action1(action_arg); + if (check2(input)) return action2(action_arg); + if (check3(input)) return action3(action_arg); + return action_fail(action_arg); +} + +template +auto IfList(CheckArg input, ActionArg action_arg, ActionFail action_fail, + Check0 check0, Check1 check1, Check2 check2, Check3 check3, + Check4 check4, Action0 action0, Action1 action1, Action2 action2, + Action3 action3, Action4 action4) { + if (check0(input)) return action0(action_arg); + if (check1(input)) return action1(action_arg); + if (check2(input)) return action2(action_arg); + if (check3(input)) return action3(action_arg); + if (check4(input)) return action4(action_arg); + return action_fail(action_arg); +} + +template +auto IfList(CheckArg input, ActionArg action_arg, ActionFail action_fail, + Check0 check0, Check1 check1, Check2 check2, Check3 check3, + Check4 check4, Check5 check5, Action0 action0, Action1 action1, + Action2 action2, Action3 action3, Action4 action4, + Action5 action5) { + if (check0(input)) return action0(action_arg); + if (check1(input)) return action1(action_arg); + if (check2(input)) return action2(action_arg); + if (check3(input)) return action3(action_arg); + if (check4(input)) return action4(action_arg); + if (check5(input)) return action5(action_arg); + return action_fail(action_arg); +} + +template +auto IfList(CheckArg input, ActionArg action_arg, ActionFail action_fail, + Check0 check0, Check1 check1, Check2 check2, Check3 check3, + Check4 check4, Check5 check5, Check6 check6, Action0 action0, + Action1 action1, Action2 action2, Action3 action3, Action4 action4, + Action5 action5, Action6 action6) { + if (check0(input)) return action0(action_arg); + if (check1(input)) return action1(action_arg); + if (check2(input)) return action2(action_arg); + if (check3(input)) return action3(action_arg); + if (check4(input)) return action4(action_arg); + if (check5(input)) return action5(action_arg); + if (check6(input)) return action6(action_arg); + return action_fail(action_arg); +} + +template +auto IfList(CheckArg input, ActionArg action_arg, ActionFail action_fail, + Check0 check0, Check1 check1, Check2 check2, Check3 check3, + Check4 check4, Check5 check5, Check6 check6, Check7 check7, + Action0 action0, Action1 action1, Action2 action2, Action3 action3, + Action4 action4, Action5 action5, Action6 action6, + Action7 action7) { + if (check0(input)) return action0(action_arg); + if (check1(input)) return action1(action_arg); + if (check2(input)) return action2(action_arg); + if (check3(input)) return action3(action_arg); + if (check4(input)) return action4(action_arg); + if (check5(input)) return action5(action_arg); + if (check6(input)) return action6(action_arg); + if (check7(input)) return action7(action_arg); + return action_fail(action_arg); +} + +template +auto IfList(CheckArg input, ActionArg action_arg, ActionFail action_fail, + Check0 check0, Check1 check1, Check2 check2, Check3 check3, + Check4 check4, Check5 check5, Check6 check6, Check7 check7, + Check8 check8, Action0 action0, Action1 action1, Action2 action2, + Action3 action3, Action4 action4, Action5 action5, Action6 action6, + Action7 action7, Action8 action8) { + if (check0(input)) return action0(action_arg); + if (check1(input)) return action1(action_arg); + if (check2(input)) return action2(action_arg); + if (check3(input)) return action3(action_arg); + if (check4(input)) return action4(action_arg); + if (check5(input)) return action5(action_arg); + if (check6(input)) return action6(action_arg); + if (check7(input)) return action7(action_arg); + if (check8(input)) return action8(action_arg); + return action_fail(action_arg); +} + +template +auto IfList(CheckArg input, ActionArg action_arg, ActionFail action_fail, + Check0 check0, Check1 check1, Check2 check2, Check3 check3, + Check4 check4, Check5 check5, Check6 check6, Check7 check7, + Check8 check8, Check9 check9, Action0 action0, Action1 action1, + Action2 action2, Action3 action3, Action4 action4, Action5 action5, + Action6 action6, Action7 action7, Action8 action8, + Action9 action9) { + if (check0(input)) return action0(action_arg); + if (check1(input)) return action1(action_arg); + if (check2(input)) return action2(action_arg); + if (check3(input)) return action3(action_arg); + if (check4(input)) return action4(action_arg); + if (check5(input)) return action5(action_arg); + if (check6(input)) return action6(action_arg); + if (check7(input)) return action7(action_arg); + if (check8(input)) return action8(action_arg); + if (check9(input)) return action9(action_arg); + return action_fail(action_arg); +} + +template +auto IfList(CheckArg input, ActionArg action_arg, ActionFail action_fail, + Check0 check0, Check1 check1, Check2 check2, Check3 check3, + Check4 check4, Check5 check5, Check6 check6, Check7 check7, + Check8 check8, Check9 check9, Check10 check10, Action0 action0, + Action1 action1, Action2 action2, Action3 action3, Action4 action4, + Action5 action5, Action6 action6, Action7 action7, Action8 action8, + Action9 action9, Action10 action10) { + if (check0(input)) return action0(action_arg); + if (check1(input)) return action1(action_arg); + if (check2(input)) return action2(action_arg); + if (check3(input)) return action3(action_arg); + if (check4(input)) return action4(action_arg); + if (check5(input)) return action5(action_arg); + if (check6(input)) return action6(action_arg); + if (check7(input)) return action7(action_arg); + if (check8(input)) return action8(action_arg); + if (check9(input)) return action9(action_arg); + if (check10(input)) return action10(action_arg); + return action_fail(action_arg); +} + +template +auto IfList(CheckArg input, ActionArg action_arg, ActionFail action_fail, + Check0 check0, Check1 check1, Check2 check2, Check3 check3, + Check4 check4, Check5 check5, Check6 check6, Check7 check7, + Check8 check8, Check9 check9, Check10 check10, Check11 check11, + Action0 action0, Action1 action1, Action2 action2, Action3 action3, + Action4 action4, Action5 action5, Action6 action6, Action7 action7, + Action8 action8, Action9 action9, Action10 action10, + Action11 action11) { + if (check0(input)) return action0(action_arg); + if (check1(input)) return action1(action_arg); + if (check2(input)) return action2(action_arg); + if (check3(input)) return action3(action_arg); + if (check4(input)) return action4(action_arg); + if (check5(input)) return action5(action_arg); + if (check6(input)) return action6(action_arg); + if (check7(input)) return action7(action_arg); + if (check8(input)) return action8(action_arg); + if (check9(input)) return action9(action_arg); + if (check10(input)) return action10(action_arg); + if (check11(input)) return action11(action_arg); + return action_fail(action_arg); +} + +template +auto IfList(CheckArg input, ActionArg action_arg, ActionFail action_fail, + Check0 check0, Check1 check1, Check2 check2, Check3 check3, + Check4 check4, Check5 check5, Check6 check6, Check7 check7, + Check8 check8, Check9 check9, Check10 check10, Check11 check11, + Check12 check12, Action0 action0, Action1 action1, Action2 action2, + Action3 action3, Action4 action4, Action5 action5, Action6 action6, + Action7 action7, Action8 action8, Action9 action9, + Action10 action10, Action11 action11, Action12 action12) { + if (check0(input)) return action0(action_arg); + if (check1(input)) return action1(action_arg); + if (check2(input)) return action2(action_arg); + if (check3(input)) return action3(action_arg); + if (check4(input)) return action4(action_arg); + if (check5(input)) return action5(action_arg); + if (check6(input)) return action6(action_arg); + if (check7(input)) return action7(action_arg); + if (check8(input)) return action8(action_arg); + if (check9(input)) return action9(action_arg); + if (check10(input)) return action10(action_arg); + if (check11(input)) return action11(action_arg); + if (check12(input)) return action12(action_arg); + return action_fail(action_arg); +} + +template < + typename CheckArg, typename ActionArg, typename ActionFail, typename Check0, + typename Check1, typename Check2, typename Check3, typename Check4, + typename Check5, typename Check6, typename Check7, typename Check8, + typename Check9, typename Check10, typename Check11, typename Check12, + typename Check13, typename Action0, typename Action1, typename Action2, + typename Action3, typename Action4, typename Action5, typename Action6, + typename Action7, typename Action8, typename Action9, typename Action10, + typename Action11, typename Action12, typename Action13> +auto IfList(CheckArg input, ActionArg action_arg, ActionFail action_fail, + Check0 check0, Check1 check1, Check2 check2, Check3 check3, + Check4 check4, Check5 check5, Check6 check6, Check7 check7, + Check8 check8, Check9 check9, Check10 check10, Check11 check11, + Check12 check12, Check13 check13, Action0 action0, Action1 action1, + Action2 action2, Action3 action3, Action4 action4, Action5 action5, + Action6 action6, Action7 action7, Action8 action8, Action9 action9, + Action10 action10, Action11 action11, Action12 action12, + Action13 action13) { + if (check0(input)) return action0(action_arg); + if (check1(input)) return action1(action_arg); + if (check2(input)) return action2(action_arg); + if (check3(input)) return action3(action_arg); + if (check4(input)) return action4(action_arg); + if (check5(input)) return action5(action_arg); + if (check6(input)) return action6(action_arg); + if (check7(input)) return action7(action_arg); + if (check8(input)) return action8(action_arg); + if (check9(input)) return action9(action_arg); + if (check10(input)) return action10(action_arg); + if (check11(input)) return action11(action_arg); + if (check12(input)) return action12(action_arg); + if (check13(input)) return action13(action_arg); + return action_fail(action_arg); +} + +template +auto IfList(CheckArg input, ActionArg action_arg, ActionFail action_fail, + Check0 check0, Check1 check1, Check2 check2, Check3 check3, + Check4 check4, Check5 check5, Check6 check6, Check7 check7, + Check8 check8, Check9 check9, Check10 check10, Check11 check11, + Check12 check12, Check13 check13, Check14 check14, Action0 action0, + Action1 action1, Action2 action2, Action3 action3, Action4 action4, + Action5 action5, Action6 action6, Action7 action7, Action8 action8, + Action9 action9, Action10 action10, Action11 action11, + Action12 action12, Action13 action13, Action14 action14) { + if (check0(input)) return action0(action_arg); + if (check1(input)) return action1(action_arg); + if (check2(input)) return action2(action_arg); + if (check3(input)) return action3(action_arg); + if (check4(input)) return action4(action_arg); + if (check5(input)) return action5(action_arg); + if (check6(input)) return action6(action_arg); + if (check7(input)) return action7(action_arg); + if (check8(input)) return action8(action_arg); + if (check9(input)) return action9(action_arg); + if (check10(input)) return action10(action_arg); + if (check11(input)) return action11(action_arg); + if (check12(input)) return action12(action_arg); + if (check13(input)) return action13(action_arg); + if (check14(input)) return action14(action_arg); + return action_fail(action_arg); +} + +template < + typename CheckArg, typename ActionArg, typename ActionFail, typename Check0, + typename Check1, typename Check2, typename Check3, typename Check4, + typename Check5, typename Check6, typename Check7, typename Check8, + typename Check9, typename Check10, typename Check11, typename Check12, + typename Check13, typename Check14, typename Check15, typename Action0, + typename Action1, typename Action2, typename Action3, typename Action4, + typename Action5, typename Action6, typename Action7, typename Action8, + typename Action9, typename Action10, typename Action11, typename Action12, + typename Action13, typename Action14, typename Action15> +auto IfList(CheckArg input, ActionArg action_arg, ActionFail action_fail, + Check0 check0, Check1 check1, Check2 check2, Check3 check3, + Check4 check4, Check5 check5, Check6 check6, Check7 check7, + Check8 check8, Check9 check9, Check10 check10, Check11 check11, + Check12 check12, Check13 check13, Check14 check14, Check15 check15, + Action0 action0, Action1 action1, Action2 action2, Action3 action3, + Action4 action4, Action5 action5, Action6 action6, Action7 action7, + Action8 action8, Action9 action9, Action10 action10, + Action11 action11, Action12 action12, Action13 action13, + Action14 action14, Action15 action15) { + if (check0(input)) return action0(action_arg); + if (check1(input)) return action1(action_arg); + if (check2(input)) return action2(action_arg); + if (check3(input)) return action3(action_arg); + if (check4(input)) return action4(action_arg); + if (check5(input)) return action5(action_arg); + if (check6(input)) return action6(action_arg); + if (check7(input)) return action7(action_arg); + if (check8(input)) return action8(action_arg); + if (check9(input)) return action9(action_arg); + if (check10(input)) return action10(action_arg); + if (check11(input)) return action11(action_arg); + if (check12(input)) return action12(action_arg); + if (check13(input)) return action13(action_arg); + if (check14(input)) return action14(action_arg); + if (check15(input)) return action15(action_arg); + return action_fail(action_arg); +} + +template < + typename CheckArg, typename ActionArg, typename ActionFail, typename Check0, + typename Check1, typename Check2, typename Check3, typename Check4, + typename Check5, typename Check6, typename Check7, typename Check8, + typename Check9, typename Check10, typename Check11, typename Check12, + typename Check13, typename Check14, typename Check15, typename Check16, + typename Action0, typename Action1, typename Action2, typename Action3, + typename Action4, typename Action5, typename Action6, typename Action7, + typename Action8, typename Action9, typename Action10, typename Action11, + typename Action12, typename Action13, typename Action14, typename Action15, + typename Action16> +auto IfList(CheckArg input, ActionArg action_arg, ActionFail action_fail, + Check0 check0, Check1 check1, Check2 check2, Check3 check3, + Check4 check4, Check5 check5, Check6 check6, Check7 check7, + Check8 check8, Check9 check9, Check10 check10, Check11 check11, + Check12 check12, Check13 check13, Check14 check14, Check15 check15, + Check16 check16, Action0 action0, Action1 action1, Action2 action2, + Action3 action3, Action4 action4, Action5 action5, Action6 action6, + Action7 action7, Action8 action8, Action9 action9, + Action10 action10, Action11 action11, Action12 action12, + Action13 action13, Action14 action14, Action15 action15, + Action16 action16) { + if (check0(input)) return action0(action_arg); + if (check1(input)) return action1(action_arg); + if (check2(input)) return action2(action_arg); + if (check3(input)) return action3(action_arg); + if (check4(input)) return action4(action_arg); + if (check5(input)) return action5(action_arg); + if (check6(input)) return action6(action_arg); + if (check7(input)) return action7(action_arg); + if (check8(input)) return action8(action_arg); + if (check9(input)) return action9(action_arg); + if (check10(input)) return action10(action_arg); + if (check11(input)) return action11(action_arg); + if (check12(input)) return action12(action_arg); + if (check13(input)) return action13(action_arg); + if (check14(input)) return action14(action_arg); + if (check15(input)) return action15(action_arg); + if (check16(input)) return action16(action_arg); + return action_fail(action_arg); +} + +template < + typename CheckArg, typename ActionArg, typename ActionFail, typename Check0, + typename Check1, typename Check2, typename Check3, typename Check4, + typename Check5, typename Check6, typename Check7, typename Check8, + typename Check9, typename Check10, typename Check11, typename Check12, + typename Check13, typename Check14, typename Check15, typename Check16, + typename Check17, typename Action0, typename Action1, typename Action2, + typename Action3, typename Action4, typename Action5, typename Action6, + typename Action7, typename Action8, typename Action9, typename Action10, + typename Action11, typename Action12, typename Action13, typename Action14, + typename Action15, typename Action16, typename Action17> +auto IfList(CheckArg input, ActionArg action_arg, ActionFail action_fail, + Check0 check0, Check1 check1, Check2 check2, Check3 check3, + Check4 check4, Check5 check5, Check6 check6, Check7 check7, + Check8 check8, Check9 check9, Check10 check10, Check11 check11, + Check12 check12, Check13 check13, Check14 check14, Check15 check15, + Check16 check16, Check17 check17, Action0 action0, Action1 action1, + Action2 action2, Action3 action3, Action4 action4, Action5 action5, + Action6 action6, Action7 action7, Action8 action8, Action9 action9, + Action10 action10, Action11 action11, Action12 action12, + Action13 action13, Action14 action14, Action15 action15, + Action16 action16, Action17 action17) { + if (check0(input)) return action0(action_arg); + if (check1(input)) return action1(action_arg); + if (check2(input)) return action2(action_arg); + if (check3(input)) return action3(action_arg); + if (check4(input)) return action4(action_arg); + if (check5(input)) return action5(action_arg); + if (check6(input)) return action6(action_arg); + if (check7(input)) return action7(action_arg); + if (check8(input)) return action8(action_arg); + if (check9(input)) return action9(action_arg); + if (check10(input)) return action10(action_arg); + if (check11(input)) return action11(action_arg); + if (check12(input)) return action12(action_arg); + if (check13(input)) return action13(action_arg); + if (check14(input)) return action14(action_arg); + if (check15(input)) return action15(action_arg); + if (check16(input)) return action16(action_arg); + if (check17(input)) return action17(action_arg); + return action_fail(action_arg); +} + +template < + typename CheckArg, typename ActionArg, typename ActionFail, typename Check0, + typename Check1, typename Check2, typename Check3, typename Check4, + typename Check5, typename Check6, typename Check7, typename Check8, + typename Check9, typename Check10, typename Check11, typename Check12, + typename Check13, typename Check14, typename Check15, typename Check16, + typename Check17, typename Check18, typename Action0, typename Action1, + typename Action2, typename Action3, typename Action4, typename Action5, + typename Action6, typename Action7, typename Action8, typename Action9, + typename Action10, typename Action11, typename Action12, typename Action13, + typename Action14, typename Action15, typename Action16, typename Action17, + typename Action18> +auto IfList(CheckArg input, ActionArg action_arg, ActionFail action_fail, + Check0 check0, Check1 check1, Check2 check2, Check3 check3, + Check4 check4, Check5 check5, Check6 check6, Check7 check7, + Check8 check8, Check9 check9, Check10 check10, Check11 check11, + Check12 check12, Check13 check13, Check14 check14, Check15 check15, + Check16 check16, Check17 check17, Check18 check18, Action0 action0, + Action1 action1, Action2 action2, Action3 action3, Action4 action4, + Action5 action5, Action6 action6, Action7 action7, Action8 action8, + Action9 action9, Action10 action10, Action11 action11, + Action12 action12, Action13 action13, Action14 action14, + Action15 action15, Action16 action16, Action17 action17, + Action18 action18) { + if (check0(input)) return action0(action_arg); + if (check1(input)) return action1(action_arg); + if (check2(input)) return action2(action_arg); + if (check3(input)) return action3(action_arg); + if (check4(input)) return action4(action_arg); + if (check5(input)) return action5(action_arg); + if (check6(input)) return action6(action_arg); + if (check7(input)) return action7(action_arg); + if (check8(input)) return action8(action_arg); + if (check9(input)) return action9(action_arg); + if (check10(input)) return action10(action_arg); + if (check11(input)) return action11(action_arg); + if (check12(input)) return action12(action_arg); + if (check13(input)) return action13(action_arg); + if (check14(input)) return action14(action_arg); + if (check15(input)) return action15(action_arg); + if (check16(input)) return action16(action_arg); + if (check17(input)) return action17(action_arg); + if (check18(input)) return action18(action_arg); + return action_fail(action_arg); +} + +template < + typename CheckArg, typename ActionArg, typename ActionFail, typename Check0, + typename Check1, typename Check2, typename Check3, typename Check4, + typename Check5, typename Check6, typename Check7, typename Check8, + typename Check9, typename Check10, typename Check11, typename Check12, + typename Check13, typename Check14, typename Check15, typename Check16, + typename Check17, typename Check18, typename Check19, typename Action0, + typename Action1, typename Action2, typename Action3, typename Action4, + typename Action5, typename Action6, typename Action7, typename Action8, + typename Action9, typename Action10, typename Action11, typename Action12, + typename Action13, typename Action14, typename Action15, typename Action16, + typename Action17, typename Action18, typename Action19> +auto IfList(CheckArg input, ActionArg action_arg, ActionFail action_fail, + Check0 check0, Check1 check1, Check2 check2, Check3 check3, + Check4 check4, Check5 check5, Check6 check6, Check7 check7, + Check8 check8, Check9 check9, Check10 check10, Check11 check11, + Check12 check12, Check13 check13, Check14 check14, Check15 check15, + Check16 check16, Check17 check17, Check18 check18, Check19 check19, + Action0 action0, Action1 action1, Action2 action2, Action3 action3, + Action4 action4, Action5 action5, Action6 action6, Action7 action7, + Action8 action8, Action9 action9, Action10 action10, + Action11 action11, Action12 action12, Action13 action13, + Action14 action14, Action15 action15, Action16 action16, + Action17 action17, Action18 action18, Action19 action19) { + if (check0(input)) return action0(action_arg); + if (check1(input)) return action1(action_arg); + if (check2(input)) return action2(action_arg); + if (check3(input)) return action3(action_arg); + if (check4(input)) return action4(action_arg); + if (check5(input)) return action5(action_arg); + if (check6(input)) return action6(action_arg); + if (check7(input)) return action7(action_arg); + if (check8(input)) return action8(action_arg); + if (check9(input)) return action9(action_arg); + if (check10(input)) return action10(action_arg); + if (check11(input)) return action11(action_arg); + if (check12(input)) return action12(action_arg); + if (check13(input)) return action13(action_arg); + if (check14(input)) return action14(action_arg); + if (check15(input)) return action15(action_arg); + if (check16(input)) return action16(action_arg); + if (check17(input)) return action17(action_arg); + if (check18(input)) return action18(action_arg); + if (check19(input)) return action19(action_arg); + return action_fail(action_arg); +} + +template < + typename CheckArg, typename ActionArg, typename ActionFail, typename Check0, + typename Check1, typename Check2, typename Check3, typename Check4, + typename Check5, typename Check6, typename Check7, typename Check8, + typename Check9, typename Check10, typename Check11, typename Check12, + typename Check13, typename Check14, typename Check15, typename Check16, + typename Check17, typename Check18, typename Check19, typename Check20, + typename Action0, typename Action1, typename Action2, typename Action3, + typename Action4, typename Action5, typename Action6, typename Action7, + typename Action8, typename Action9, typename Action10, typename Action11, + typename Action12, typename Action13, typename Action14, typename Action15, + typename Action16, typename Action17, typename Action18, typename Action19, + typename Action20> +auto IfList(CheckArg input, ActionArg action_arg, ActionFail action_fail, + Check0 check0, Check1 check1, Check2 check2, Check3 check3, + Check4 check4, Check5 check5, Check6 check6, Check7 check7, + Check8 check8, Check9 check9, Check10 check10, Check11 check11, + Check12 check12, Check13 check13, Check14 check14, Check15 check15, + Check16 check16, Check17 check17, Check18 check18, Check19 check19, + Check20 check20, Action0 action0, Action1 action1, Action2 action2, + Action3 action3, Action4 action4, Action5 action5, Action6 action6, + Action7 action7, Action8 action8, Action9 action9, + Action10 action10, Action11 action11, Action12 action12, + Action13 action13, Action14 action14, Action15 action15, + Action16 action16, Action17 action17, Action18 action18, + Action19 action19, Action20 action20) { + if (check0(input)) return action0(action_arg); + if (check1(input)) return action1(action_arg); + if (check2(input)) return action2(action_arg); + if (check3(input)) return action3(action_arg); + if (check4(input)) return action4(action_arg); + if (check5(input)) return action5(action_arg); + if (check6(input)) return action6(action_arg); + if (check7(input)) return action7(action_arg); + if (check8(input)) return action8(action_arg); + if (check9(input)) return action9(action_arg); + if (check10(input)) return action10(action_arg); + if (check11(input)) return action11(action_arg); + if (check12(input)) return action12(action_arg); + if (check13(input)) return action13(action_arg); + if (check14(input)) return action14(action_arg); + if (check15(input)) return action15(action_arg); + if (check16(input)) return action16(action_arg); + if (check17(input)) return action17(action_arg); + if (check18(input)) return action18(action_arg); + if (check19(input)) return action19(action_arg); + if (check20(input)) return action20(action_arg); + return action_fail(action_arg); +} + +template < + typename CheckArg, typename ActionArg, typename ActionFail, typename Check0, + typename Check1, typename Check2, typename Check3, typename Check4, + typename Check5, typename Check6, typename Check7, typename Check8, + typename Check9, typename Check10, typename Check11, typename Check12, + typename Check13, typename Check14, typename Check15, typename Check16, + typename Check17, typename Check18, typename Check19, typename Check20, + typename Check21, typename Action0, typename Action1, typename Action2, + typename Action3, typename Action4, typename Action5, typename Action6, + typename Action7, typename Action8, typename Action9, typename Action10, + typename Action11, typename Action12, typename Action13, typename Action14, + typename Action15, typename Action16, typename Action17, typename Action18, + typename Action19, typename Action20, typename Action21> +auto IfList(CheckArg input, ActionArg action_arg, ActionFail action_fail, + Check0 check0, Check1 check1, Check2 check2, Check3 check3, + Check4 check4, Check5 check5, Check6 check6, Check7 check7, + Check8 check8, Check9 check9, Check10 check10, Check11 check11, + Check12 check12, Check13 check13, Check14 check14, Check15 check15, + Check16 check16, Check17 check17, Check18 check18, Check19 check19, + Check20 check20, Check21 check21, Action0 action0, Action1 action1, + Action2 action2, Action3 action3, Action4 action4, Action5 action5, + Action6 action6, Action7 action7, Action8 action8, Action9 action9, + Action10 action10, Action11 action11, Action12 action12, + Action13 action13, Action14 action14, Action15 action15, + Action16 action16, Action17 action17, Action18 action18, + Action19 action19, Action20 action20, Action21 action21) { + if (check0(input)) return action0(action_arg); + if (check1(input)) return action1(action_arg); + if (check2(input)) return action2(action_arg); + if (check3(input)) return action3(action_arg); + if (check4(input)) return action4(action_arg); + if (check5(input)) return action5(action_arg); + if (check6(input)) return action6(action_arg); + if (check7(input)) return action7(action_arg); + if (check8(input)) return action8(action_arg); + if (check9(input)) return action9(action_arg); + if (check10(input)) return action10(action_arg); + if (check11(input)) return action11(action_arg); + if (check12(input)) return action12(action_arg); + if (check13(input)) return action13(action_arg); + if (check14(input)) return action14(action_arg); + if (check15(input)) return action15(action_arg); + if (check16(input)) return action16(action_arg); + if (check17(input)) return action17(action_arg); + if (check18(input)) return action18(action_arg); + if (check19(input)) return action19(action_arg); + if (check20(input)) return action20(action_arg); + if (check21(input)) return action21(action_arg); + return action_fail(action_arg); +} + +template < + typename CheckArg, typename ActionArg, typename ActionFail, typename Check0, + typename Check1, typename Check2, typename Check3, typename Check4, + typename Check5, typename Check6, typename Check7, typename Check8, + typename Check9, typename Check10, typename Check11, typename Check12, + typename Check13, typename Check14, typename Check15, typename Check16, + typename Check17, typename Check18, typename Check19, typename Check20, + typename Check21, typename Check22, typename Action0, typename Action1, + typename Action2, typename Action3, typename Action4, typename Action5, + typename Action6, typename Action7, typename Action8, typename Action9, + typename Action10, typename Action11, typename Action12, typename Action13, + typename Action14, typename Action15, typename Action16, typename Action17, + typename Action18, typename Action19, typename Action20, typename Action21, + typename Action22> +auto IfList(CheckArg input, ActionArg action_arg, ActionFail action_fail, + Check0 check0, Check1 check1, Check2 check2, Check3 check3, + Check4 check4, Check5 check5, Check6 check6, Check7 check7, + Check8 check8, Check9 check9, Check10 check10, Check11 check11, + Check12 check12, Check13 check13, Check14 check14, Check15 check15, + Check16 check16, Check17 check17, Check18 check18, Check19 check19, + Check20 check20, Check21 check21, Check22 check22, Action0 action0, + Action1 action1, Action2 action2, Action3 action3, Action4 action4, + Action5 action5, Action6 action6, Action7 action7, Action8 action8, + Action9 action9, Action10 action10, Action11 action11, + Action12 action12, Action13 action13, Action14 action14, + Action15 action15, Action16 action16, Action17 action17, + Action18 action18, Action19 action19, Action20 action20, + Action21 action21, Action22 action22) { + if (check0(input)) return action0(action_arg); + if (check1(input)) return action1(action_arg); + if (check2(input)) return action2(action_arg); + if (check3(input)) return action3(action_arg); + if (check4(input)) return action4(action_arg); + if (check5(input)) return action5(action_arg); + if (check6(input)) return action6(action_arg); + if (check7(input)) return action7(action_arg); + if (check8(input)) return action8(action_arg); + if (check9(input)) return action9(action_arg); + if (check10(input)) return action10(action_arg); + if (check11(input)) return action11(action_arg); + if (check12(input)) return action12(action_arg); + if (check13(input)) return action13(action_arg); + if (check14(input)) return action14(action_arg); + if (check15(input)) return action15(action_arg); + if (check16(input)) return action16(action_arg); + if (check17(input)) return action17(action_arg); + if (check18(input)) return action18(action_arg); + if (check19(input)) return action19(action_arg); + if (check20(input)) return action20(action_arg); + if (check21(input)) return action21(action_arg); + if (check22(input)) return action22(action_arg); + return action_fail(action_arg); +} + +template < + typename CheckArg, typename ActionArg, typename ActionFail, typename Check0, + typename Check1, typename Check2, typename Check3, typename Check4, + typename Check5, typename Check6, typename Check7, typename Check8, + typename Check9, typename Check10, typename Check11, typename Check12, + typename Check13, typename Check14, typename Check15, typename Check16, + typename Check17, typename Check18, typename Check19, typename Check20, + typename Check21, typename Check22, typename Check23, typename Action0, + typename Action1, typename Action2, typename Action3, typename Action4, + typename Action5, typename Action6, typename Action7, typename Action8, + typename Action9, typename Action10, typename Action11, typename Action12, + typename Action13, typename Action14, typename Action15, typename Action16, + typename Action17, typename Action18, typename Action19, typename Action20, + typename Action21, typename Action22, typename Action23> +auto IfList(CheckArg input, ActionArg action_arg, ActionFail action_fail, + Check0 check0, Check1 check1, Check2 check2, Check3 check3, + Check4 check4, Check5 check5, Check6 check6, Check7 check7, + Check8 check8, Check9 check9, Check10 check10, Check11 check11, + Check12 check12, Check13 check13, Check14 check14, Check15 check15, + Check16 check16, Check17 check17, Check18 check18, Check19 check19, + Check20 check20, Check21 check21, Check22 check22, Check23 check23, + Action0 action0, Action1 action1, Action2 action2, Action3 action3, + Action4 action4, Action5 action5, Action6 action6, Action7 action7, + Action8 action8, Action9 action9, Action10 action10, + Action11 action11, Action12 action12, Action13 action13, + Action14 action14, Action15 action15, Action16 action16, + Action17 action17, Action18 action18, Action19 action19, + Action20 action20, Action21 action21, Action22 action22, + Action23 action23) { + if (check0(input)) return action0(action_arg); + if (check1(input)) return action1(action_arg); + if (check2(input)) return action2(action_arg); + if (check3(input)) return action3(action_arg); + if (check4(input)) return action4(action_arg); + if (check5(input)) return action5(action_arg); + if (check6(input)) return action6(action_arg); + if (check7(input)) return action7(action_arg); + if (check8(input)) return action8(action_arg); + if (check9(input)) return action9(action_arg); + if (check10(input)) return action10(action_arg); + if (check11(input)) return action11(action_arg); + if (check12(input)) return action12(action_arg); + if (check13(input)) return action13(action_arg); + if (check14(input)) return action14(action_arg); + if (check15(input)) return action15(action_arg); + if (check16(input)) return action16(action_arg); + if (check17(input)) return action17(action_arg); + if (check18(input)) return action18(action_arg); + if (check19(input)) return action19(action_arg); + if (check20(input)) return action20(action_arg); + if (check21(input)) return action21(action_arg); + if (check22(input)) return action22(action_arg); + if (check23(input)) return action23(action_arg); + return action_fail(action_arg); +} + +template < + typename CheckArg, typename ActionArg, typename ActionFail, typename Check0, + typename Check1, typename Check2, typename Check3, typename Check4, + typename Check5, typename Check6, typename Check7, typename Check8, + typename Check9, typename Check10, typename Check11, typename Check12, + typename Check13, typename Check14, typename Check15, typename Check16, + typename Check17, typename Check18, typename Check19, typename Check20, + typename Check21, typename Check22, typename Check23, typename Check24, + typename Action0, typename Action1, typename Action2, typename Action3, + typename Action4, typename Action5, typename Action6, typename Action7, + typename Action8, typename Action9, typename Action10, typename Action11, + typename Action12, typename Action13, typename Action14, typename Action15, + typename Action16, typename Action17, typename Action18, typename Action19, + typename Action20, typename Action21, typename Action22, typename Action23, + typename Action24> +auto IfList(CheckArg input, ActionArg action_arg, ActionFail action_fail, + Check0 check0, Check1 check1, Check2 check2, Check3 check3, + Check4 check4, Check5 check5, Check6 check6, Check7 check7, + Check8 check8, Check9 check9, Check10 check10, Check11 check11, + Check12 check12, Check13 check13, Check14 check14, Check15 check15, + Check16 check16, Check17 check17, Check18 check18, Check19 check19, + Check20 check20, Check21 check21, Check22 check22, Check23 check23, + Check24 check24, Action0 action0, Action1 action1, Action2 action2, + Action3 action3, Action4 action4, Action5 action5, Action6 action6, + Action7 action7, Action8 action8, Action9 action9, + Action10 action10, Action11 action11, Action12 action12, + Action13 action13, Action14 action14, Action15 action15, + Action16 action16, Action17 action17, Action18 action18, + Action19 action19, Action20 action20, Action21 action21, + Action22 action22, Action23 action23, Action24 action24) { + if (check0(input)) return action0(action_arg); + if (check1(input)) return action1(action_arg); + if (check2(input)) return action2(action_arg); + if (check3(input)) return action3(action_arg); + if (check4(input)) return action4(action_arg); + if (check5(input)) return action5(action_arg); + if (check6(input)) return action6(action_arg); + if (check7(input)) return action7(action_arg); + if (check8(input)) return action8(action_arg); + if (check9(input)) return action9(action_arg); + if (check10(input)) return action10(action_arg); + if (check11(input)) return action11(action_arg); + if (check12(input)) return action12(action_arg); + if (check13(input)) return action13(action_arg); + if (check14(input)) return action14(action_arg); + if (check15(input)) return action15(action_arg); + if (check16(input)) return action16(action_arg); + if (check17(input)) return action17(action_arg); + if (check18(input)) return action18(action_arg); + if (check19(input)) return action19(action_arg); + if (check20(input)) return action20(action_arg); + if (check21(input)) return action21(action_arg); + if (check22(input)) return action22(action_arg); + if (check23(input)) return action23(action_arg); + if (check24(input)) return action24(action_arg); + return action_fail(action_arg); +} + +template < + typename CheckArg, typename ActionArg, typename ActionFail, typename Check0, + typename Check1, typename Check2, typename Check3, typename Check4, + typename Check5, typename Check6, typename Check7, typename Check8, + typename Check9, typename Check10, typename Check11, typename Check12, + typename Check13, typename Check14, typename Check15, typename Check16, + typename Check17, typename Check18, typename Check19, typename Check20, + typename Check21, typename Check22, typename Check23, typename Check24, + typename Check25, typename Action0, typename Action1, typename Action2, + typename Action3, typename Action4, typename Action5, typename Action6, + typename Action7, typename Action8, typename Action9, typename Action10, + typename Action11, typename Action12, typename Action13, typename Action14, + typename Action15, typename Action16, typename Action17, typename Action18, + typename Action19, typename Action20, typename Action21, typename Action22, + typename Action23, typename Action24, typename Action25> +auto IfList(CheckArg input, ActionArg action_arg, ActionFail action_fail, + Check0 check0, Check1 check1, Check2 check2, Check3 check3, + Check4 check4, Check5 check5, Check6 check6, Check7 check7, + Check8 check8, Check9 check9, Check10 check10, Check11 check11, + Check12 check12, Check13 check13, Check14 check14, Check15 check15, + Check16 check16, Check17 check17, Check18 check18, Check19 check19, + Check20 check20, Check21 check21, Check22 check22, Check23 check23, + Check24 check24, Check25 check25, Action0 action0, Action1 action1, + Action2 action2, Action3 action3, Action4 action4, Action5 action5, + Action6 action6, Action7 action7, Action8 action8, Action9 action9, + Action10 action10, Action11 action11, Action12 action12, + Action13 action13, Action14 action14, Action15 action15, + Action16 action16, Action17 action17, Action18 action18, + Action19 action19, Action20 action20, Action21 action21, + Action22 action22, Action23 action23, Action24 action24, + Action25 action25) { + if (check0(input)) return action0(action_arg); + if (check1(input)) return action1(action_arg); + if (check2(input)) return action2(action_arg); + if (check3(input)) return action3(action_arg); + if (check4(input)) return action4(action_arg); + if (check5(input)) return action5(action_arg); + if (check6(input)) return action6(action_arg); + if (check7(input)) return action7(action_arg); + if (check8(input)) return action8(action_arg); + if (check9(input)) return action9(action_arg); + if (check10(input)) return action10(action_arg); + if (check11(input)) return action11(action_arg); + if (check12(input)) return action12(action_arg); + if (check13(input)) return action13(action_arg); + if (check14(input)) return action14(action_arg); + if (check15(input)) return action15(action_arg); + if (check16(input)) return action16(action_arg); + if (check17(input)) return action17(action_arg); + if (check18(input)) return action18(action_arg); + if (check19(input)) return action19(action_arg); + if (check20(input)) return action20(action_arg); + if (check21(input)) return action21(action_arg); + if (check22(input)) return action22(action_arg); + if (check23(input)) return action23(action_arg); + if (check24(input)) return action24(action_arg); + if (check25(input)) return action25(action_arg); + return action_fail(action_arg); +} + +template < + typename CheckArg, typename ActionArg, typename ActionFail, typename Check0, + typename Check1, typename Check2, typename Check3, typename Check4, + typename Check5, typename Check6, typename Check7, typename Check8, + typename Check9, typename Check10, typename Check11, typename Check12, + typename Check13, typename Check14, typename Check15, typename Check16, + typename Check17, typename Check18, typename Check19, typename Check20, + typename Check21, typename Check22, typename Check23, typename Check24, + typename Check25, typename Check26, typename Action0, typename Action1, + typename Action2, typename Action3, typename Action4, typename Action5, + typename Action6, typename Action7, typename Action8, typename Action9, + typename Action10, typename Action11, typename Action12, typename Action13, + typename Action14, typename Action15, typename Action16, typename Action17, + typename Action18, typename Action19, typename Action20, typename Action21, + typename Action22, typename Action23, typename Action24, typename Action25, + typename Action26> +auto IfList(CheckArg input, ActionArg action_arg, ActionFail action_fail, + Check0 check0, Check1 check1, Check2 check2, Check3 check3, + Check4 check4, Check5 check5, Check6 check6, Check7 check7, + Check8 check8, Check9 check9, Check10 check10, Check11 check11, + Check12 check12, Check13 check13, Check14 check14, Check15 check15, + Check16 check16, Check17 check17, Check18 check18, Check19 check19, + Check20 check20, Check21 check21, Check22 check22, Check23 check23, + Check24 check24, Check25 check25, Check26 check26, Action0 action0, + Action1 action1, Action2 action2, Action3 action3, Action4 action4, + Action5 action5, Action6 action6, Action7 action7, Action8 action8, + Action9 action9, Action10 action10, Action11 action11, + Action12 action12, Action13 action13, Action14 action14, + Action15 action15, Action16 action16, Action17 action17, + Action18 action18, Action19 action19, Action20 action20, + Action21 action21, Action22 action22, Action23 action23, + Action24 action24, Action25 action25, Action26 action26) { + if (check0(input)) return action0(action_arg); + if (check1(input)) return action1(action_arg); + if (check2(input)) return action2(action_arg); + if (check3(input)) return action3(action_arg); + if (check4(input)) return action4(action_arg); + if (check5(input)) return action5(action_arg); + if (check6(input)) return action6(action_arg); + if (check7(input)) return action7(action_arg); + if (check8(input)) return action8(action_arg); + if (check9(input)) return action9(action_arg); + if (check10(input)) return action10(action_arg); + if (check11(input)) return action11(action_arg); + if (check12(input)) return action12(action_arg); + if (check13(input)) return action13(action_arg); + if (check14(input)) return action14(action_arg); + if (check15(input)) return action15(action_arg); + if (check16(input)) return action16(action_arg); + if (check17(input)) return action17(action_arg); + if (check18(input)) return action18(action_arg); + if (check19(input)) return action19(action_arg); + if (check20(input)) return action20(action_arg); + if (check21(input)) return action21(action_arg); + if (check22(input)) return action22(action_arg); + if (check23(input)) return action23(action_arg); + if (check24(input)) return action24(action_arg); + if (check25(input)) return action25(action_arg); + if (check26(input)) return action26(action_arg); + return action_fail(action_arg); +} + +template < + typename CheckArg, typename ActionArg, typename ActionFail, typename Check0, + typename Check1, typename Check2, typename Check3, typename Check4, + typename Check5, typename Check6, typename Check7, typename Check8, + typename Check9, typename Check10, typename Check11, typename Check12, + typename Check13, typename Check14, typename Check15, typename Check16, + typename Check17, typename Check18, typename Check19, typename Check20, + typename Check21, typename Check22, typename Check23, typename Check24, + typename Check25, typename Check26, typename Check27, typename Action0, + typename Action1, typename Action2, typename Action3, typename Action4, + typename Action5, typename Action6, typename Action7, typename Action8, + typename Action9, typename Action10, typename Action11, typename Action12, + typename Action13, typename Action14, typename Action15, typename Action16, + typename Action17, typename Action18, typename Action19, typename Action20, + typename Action21, typename Action22, typename Action23, typename Action24, + typename Action25, typename Action26, typename Action27> +auto IfList(CheckArg input, ActionArg action_arg, ActionFail action_fail, + Check0 check0, Check1 check1, Check2 check2, Check3 check3, + Check4 check4, Check5 check5, Check6 check6, Check7 check7, + Check8 check8, Check9 check9, Check10 check10, Check11 check11, + Check12 check12, Check13 check13, Check14 check14, Check15 check15, + Check16 check16, Check17 check17, Check18 check18, Check19 check19, + Check20 check20, Check21 check21, Check22 check22, Check23 check23, + Check24 check24, Check25 check25, Check26 check26, Check27 check27, + Action0 action0, Action1 action1, Action2 action2, Action3 action3, + Action4 action4, Action5 action5, Action6 action6, Action7 action7, + Action8 action8, Action9 action9, Action10 action10, + Action11 action11, Action12 action12, Action13 action13, + Action14 action14, Action15 action15, Action16 action16, + Action17 action17, Action18 action18, Action19 action19, + Action20 action20, Action21 action21, Action22 action22, + Action23 action23, Action24 action24, Action25 action25, + Action26 action26, Action27 action27) { + if (check0(input)) return action0(action_arg); + if (check1(input)) return action1(action_arg); + if (check2(input)) return action2(action_arg); + if (check3(input)) return action3(action_arg); + if (check4(input)) return action4(action_arg); + if (check5(input)) return action5(action_arg); + if (check6(input)) return action6(action_arg); + if (check7(input)) return action7(action_arg); + if (check8(input)) return action8(action_arg); + if (check9(input)) return action9(action_arg); + if (check10(input)) return action10(action_arg); + if (check11(input)) return action11(action_arg); + if (check12(input)) return action12(action_arg); + if (check13(input)) return action13(action_arg); + if (check14(input)) return action14(action_arg); + if (check15(input)) return action15(action_arg); + if (check16(input)) return action16(action_arg); + if (check17(input)) return action17(action_arg); + if (check18(input)) return action18(action_arg); + if (check19(input)) return action19(action_arg); + if (check20(input)) return action20(action_arg); + if (check21(input)) return action21(action_arg); + if (check22(input)) return action22(action_arg); + if (check23(input)) return action23(action_arg); + if (check24(input)) return action24(action_arg); + if (check25(input)) return action25(action_arg); + if (check26(input)) return action26(action_arg); + if (check27(input)) return action27(action_arg); + return action_fail(action_arg); +} + +template < + typename CheckArg, typename ActionArg, typename ActionFail, typename Check0, + typename Check1, typename Check2, typename Check3, typename Check4, + typename Check5, typename Check6, typename Check7, typename Check8, + typename Check9, typename Check10, typename Check11, typename Check12, + typename Check13, typename Check14, typename Check15, typename Check16, + typename Check17, typename Check18, typename Check19, typename Check20, + typename Check21, typename Check22, typename Check23, typename Check24, + typename Check25, typename Check26, typename Check27, typename Check28, + typename Action0, typename Action1, typename Action2, typename Action3, + typename Action4, typename Action5, typename Action6, typename Action7, + typename Action8, typename Action9, typename Action10, typename Action11, + typename Action12, typename Action13, typename Action14, typename Action15, + typename Action16, typename Action17, typename Action18, typename Action19, + typename Action20, typename Action21, typename Action22, typename Action23, + typename Action24, typename Action25, typename Action26, typename Action27, + typename Action28> +auto IfList(CheckArg input, ActionArg action_arg, ActionFail action_fail, + Check0 check0, Check1 check1, Check2 check2, Check3 check3, + Check4 check4, Check5 check5, Check6 check6, Check7 check7, + Check8 check8, Check9 check9, Check10 check10, Check11 check11, + Check12 check12, Check13 check13, Check14 check14, Check15 check15, + Check16 check16, Check17 check17, Check18 check18, Check19 check19, + Check20 check20, Check21 check21, Check22 check22, Check23 check23, + Check24 check24, Check25 check25, Check26 check26, Check27 check27, + Check28 check28, Action0 action0, Action1 action1, Action2 action2, + Action3 action3, Action4 action4, Action5 action5, Action6 action6, + Action7 action7, Action8 action8, Action9 action9, + Action10 action10, Action11 action11, Action12 action12, + Action13 action13, Action14 action14, Action15 action15, + Action16 action16, Action17 action17, Action18 action18, + Action19 action19, Action20 action20, Action21 action21, + Action22 action22, Action23 action23, Action24 action24, + Action25 action25, Action26 action26, Action27 action27, + Action28 action28) { + if (check0(input)) return action0(action_arg); + if (check1(input)) return action1(action_arg); + if (check2(input)) return action2(action_arg); + if (check3(input)) return action3(action_arg); + if (check4(input)) return action4(action_arg); + if (check5(input)) return action5(action_arg); + if (check6(input)) return action6(action_arg); + if (check7(input)) return action7(action_arg); + if (check8(input)) return action8(action_arg); + if (check9(input)) return action9(action_arg); + if (check10(input)) return action10(action_arg); + if (check11(input)) return action11(action_arg); + if (check12(input)) return action12(action_arg); + if (check13(input)) return action13(action_arg); + if (check14(input)) return action14(action_arg); + if (check15(input)) return action15(action_arg); + if (check16(input)) return action16(action_arg); + if (check17(input)) return action17(action_arg); + if (check18(input)) return action18(action_arg); + if (check19(input)) return action19(action_arg); + if (check20(input)) return action20(action_arg); + if (check21(input)) return action21(action_arg); + if (check22(input)) return action22(action_arg); + if (check23(input)) return action23(action_arg); + if (check24(input)) return action24(action_arg); + if (check25(input)) return action25(action_arg); + if (check26(input)) return action26(action_arg); + if (check27(input)) return action27(action_arg); + if (check28(input)) return action28(action_arg); + return action_fail(action_arg); +} + +template < + typename CheckArg, typename ActionArg, typename ActionFail, typename Check0, + typename Check1, typename Check2, typename Check3, typename Check4, + typename Check5, typename Check6, typename Check7, typename Check8, + typename Check9, typename Check10, typename Check11, typename Check12, + typename Check13, typename Check14, typename Check15, typename Check16, + typename Check17, typename Check18, typename Check19, typename Check20, + typename Check21, typename Check22, typename Check23, typename Check24, + typename Check25, typename Check26, typename Check27, typename Check28, + typename Check29, typename Action0, typename Action1, typename Action2, + typename Action3, typename Action4, typename Action5, typename Action6, + typename Action7, typename Action8, typename Action9, typename Action10, + typename Action11, typename Action12, typename Action13, typename Action14, + typename Action15, typename Action16, typename Action17, typename Action18, + typename Action19, typename Action20, typename Action21, typename Action22, + typename Action23, typename Action24, typename Action25, typename Action26, + typename Action27, typename Action28, typename Action29> +auto IfList(CheckArg input, ActionArg action_arg, ActionFail action_fail, + Check0 check0, Check1 check1, Check2 check2, Check3 check3, + Check4 check4, Check5 check5, Check6 check6, Check7 check7, + Check8 check8, Check9 check9, Check10 check10, Check11 check11, + Check12 check12, Check13 check13, Check14 check14, Check15 check15, + Check16 check16, Check17 check17, Check18 check18, Check19 check19, + Check20 check20, Check21 check21, Check22 check22, Check23 check23, + Check24 check24, Check25 check25, Check26 check26, Check27 check27, + Check28 check28, Check29 check29, Action0 action0, Action1 action1, + Action2 action2, Action3 action3, Action4 action4, Action5 action5, + Action6 action6, Action7 action7, Action8 action8, Action9 action9, + Action10 action10, Action11 action11, Action12 action12, + Action13 action13, Action14 action14, Action15 action15, + Action16 action16, Action17 action17, Action18 action18, + Action19 action19, Action20 action20, Action21 action21, + Action22 action22, Action23 action23, Action24 action24, + Action25 action25, Action26 action26, Action27 action27, + Action28 action28, Action29 action29) { + if (check0(input)) return action0(action_arg); + if (check1(input)) return action1(action_arg); + if (check2(input)) return action2(action_arg); + if (check3(input)) return action3(action_arg); + if (check4(input)) return action4(action_arg); + if (check5(input)) return action5(action_arg); + if (check6(input)) return action6(action_arg); + if (check7(input)) return action7(action_arg); + if (check8(input)) return action8(action_arg); + if (check9(input)) return action9(action_arg); + if (check10(input)) return action10(action_arg); + if (check11(input)) return action11(action_arg); + if (check12(input)) return action12(action_arg); + if (check13(input)) return action13(action_arg); + if (check14(input)) return action14(action_arg); + if (check15(input)) return action15(action_arg); + if (check16(input)) return action16(action_arg); + if (check17(input)) return action17(action_arg); + if (check18(input)) return action18(action_arg); + if (check19(input)) return action19(action_arg); + if (check20(input)) return action20(action_arg); + if (check21(input)) return action21(action_arg); + if (check22(input)) return action22(action_arg); + if (check23(input)) return action23(action_arg); + if (check24(input)) return action24(action_arg); + if (check25(input)) return action25(action_arg); + if (check26(input)) return action26(action_arg); + if (check27(input)) return action27(action_arg); + if (check28(input)) return action28(action_arg); + if (check29(input)) return action29(action_arg); + return action_fail(action_arg); +} + +template < + typename CheckArg, typename ActionArg, typename ActionFail, typename Check0, + typename Check1, typename Check2, typename Check3, typename Check4, + typename Check5, typename Check6, typename Check7, typename Check8, + typename Check9, typename Check10, typename Check11, typename Check12, + typename Check13, typename Check14, typename Check15, typename Check16, + typename Check17, typename Check18, typename Check19, typename Check20, + typename Check21, typename Check22, typename Check23, typename Check24, + typename Check25, typename Check26, typename Check27, typename Check28, + typename Check29, typename Check30, typename Action0, typename Action1, + typename Action2, typename Action3, typename Action4, typename Action5, + typename Action6, typename Action7, typename Action8, typename Action9, + typename Action10, typename Action11, typename Action12, typename Action13, + typename Action14, typename Action15, typename Action16, typename Action17, + typename Action18, typename Action19, typename Action20, typename Action21, + typename Action22, typename Action23, typename Action24, typename Action25, + typename Action26, typename Action27, typename Action28, typename Action29, + typename Action30> +auto IfList(CheckArg input, ActionArg action_arg, ActionFail action_fail, + Check0 check0, Check1 check1, Check2 check2, Check3 check3, + Check4 check4, Check5 check5, Check6 check6, Check7 check7, + Check8 check8, Check9 check9, Check10 check10, Check11 check11, + Check12 check12, Check13 check13, Check14 check14, Check15 check15, + Check16 check16, Check17 check17, Check18 check18, Check19 check19, + Check20 check20, Check21 check21, Check22 check22, Check23 check23, + Check24 check24, Check25 check25, Check26 check26, Check27 check27, + Check28 check28, Check29 check29, Check30 check30, Action0 action0, + Action1 action1, Action2 action2, Action3 action3, Action4 action4, + Action5 action5, Action6 action6, Action7 action7, Action8 action8, + Action9 action9, Action10 action10, Action11 action11, + Action12 action12, Action13 action13, Action14 action14, + Action15 action15, Action16 action16, Action17 action17, + Action18 action18, Action19 action19, Action20 action20, + Action21 action21, Action22 action22, Action23 action23, + Action24 action24, Action25 action25, Action26 action26, + Action27 action27, Action28 action28, Action29 action29, + Action30 action30) { + if (check0(input)) return action0(action_arg); + if (check1(input)) return action1(action_arg); + if (check2(input)) return action2(action_arg); + if (check3(input)) return action3(action_arg); + if (check4(input)) return action4(action_arg); + if (check5(input)) return action5(action_arg); + if (check6(input)) return action6(action_arg); + if (check7(input)) return action7(action_arg); + if (check8(input)) return action8(action_arg); + if (check9(input)) return action9(action_arg); + if (check10(input)) return action10(action_arg); + if (check11(input)) return action11(action_arg); + if (check12(input)) return action12(action_arg); + if (check13(input)) return action13(action_arg); + if (check14(input)) return action14(action_arg); + if (check15(input)) return action15(action_arg); + if (check16(input)) return action16(action_arg); + if (check17(input)) return action17(action_arg); + if (check18(input)) return action18(action_arg); + if (check19(input)) return action19(action_arg); + if (check20(input)) return action20(action_arg); + if (check21(input)) return action21(action_arg); + if (check22(input)) return action22(action_arg); + if (check23(input)) return action23(action_arg); + if (check24(input)) return action24(action_arg); + if (check25(input)) return action25(action_arg); + if (check26(input)) return action26(action_arg); + if (check27(input)) return action27(action_arg); + if (check28(input)) return action28(action_arg); + if (check29(input)) return action29(action_arg); + if (check30(input)) return action30(action_arg); + return action_fail(action_arg); +} + +template < + typename CheckArg, typename ActionArg, typename ActionFail, typename Check0, + typename Check1, typename Check2, typename Check3, typename Check4, + typename Check5, typename Check6, typename Check7, typename Check8, + typename Check9, typename Check10, typename Check11, typename Check12, + typename Check13, typename Check14, typename Check15, typename Check16, + typename Check17, typename Check18, typename Check19, typename Check20, + typename Check21, typename Check22, typename Check23, typename Check24, + typename Check25, typename Check26, typename Check27, typename Check28, + typename Check29, typename Check30, typename Check31, typename Action0, + typename Action1, typename Action2, typename Action3, typename Action4, + typename Action5, typename Action6, typename Action7, typename Action8, + typename Action9, typename Action10, typename Action11, typename Action12, + typename Action13, typename Action14, typename Action15, typename Action16, + typename Action17, typename Action18, typename Action19, typename Action20, + typename Action21, typename Action22, typename Action23, typename Action24, + typename Action25, typename Action26, typename Action27, typename Action28, + typename Action29, typename Action30, typename Action31> +auto IfList(CheckArg input, ActionArg action_arg, ActionFail action_fail, + Check0 check0, Check1 check1, Check2 check2, Check3 check3, + Check4 check4, Check5 check5, Check6 check6, Check7 check7, + Check8 check8, Check9 check9, Check10 check10, Check11 check11, + Check12 check12, Check13 check13, Check14 check14, Check15 check15, + Check16 check16, Check17 check17, Check18 check18, Check19 check19, + Check20 check20, Check21 check21, Check22 check22, Check23 check23, + Check24 check24, Check25 check25, Check26 check26, Check27 check27, + Check28 check28, Check29 check29, Check30 check30, Check31 check31, + Action0 action0, Action1 action1, Action2 action2, Action3 action3, + Action4 action4, Action5 action5, Action6 action6, Action7 action7, + Action8 action8, Action9 action9, Action10 action10, + Action11 action11, Action12 action12, Action13 action13, + Action14 action14, Action15 action15, Action16 action16, + Action17 action17, Action18 action18, Action19 action19, + Action20 action20, Action21 action21, Action22 action22, + Action23 action23, Action24 action24, Action25 action25, + Action26 action26, Action27 action27, Action28 action28, + Action29 action29, Action30 action30, Action31 action31) { + if (check0(input)) return action0(action_arg); + if (check1(input)) return action1(action_arg); + if (check2(input)) return action2(action_arg); + if (check3(input)) return action3(action_arg); + if (check4(input)) return action4(action_arg); + if (check5(input)) return action5(action_arg); + if (check6(input)) return action6(action_arg); + if (check7(input)) return action7(action_arg); + if (check8(input)) return action8(action_arg); + if (check9(input)) return action9(action_arg); + if (check10(input)) return action10(action_arg); + if (check11(input)) return action11(action_arg); + if (check12(input)) return action12(action_arg); + if (check13(input)) return action13(action_arg); + if (check14(input)) return action14(action_arg); + if (check15(input)) return action15(action_arg); + if (check16(input)) return action16(action_arg); + if (check17(input)) return action17(action_arg); + if (check18(input)) return action18(action_arg); + if (check19(input)) return action19(action_arg); + if (check20(input)) return action20(action_arg); + if (check21(input)) return action21(action_arg); + if (check22(input)) return action22(action_arg); + if (check23(input)) return action23(action_arg); + if (check24(input)) return action24(action_arg); + if (check25(input)) return action25(action_arg); + if (check26(input)) return action26(action_arg); + if (check27(input)) return action27(action_arg); + if (check28(input)) return action28(action_arg); + if (check29(input)) return action29(action_arg); + if (check30(input)) return action30(action_arg); + if (check31(input)) return action31(action_arg); + return action_fail(action_arg); +} + +template < + typename CheckArg, typename ActionArg, typename ActionFail, typename Check0, + typename Check1, typename Check2, typename Check3, typename Check4, + typename Check5, typename Check6, typename Check7, typename Check8, + typename Check9, typename Check10, typename Check11, typename Check12, + typename Check13, typename Check14, typename Check15, typename Check16, + typename Check17, typename Check18, typename Check19, typename Check20, + typename Check21, typename Check22, typename Check23, typename Check24, + typename Check25, typename Check26, typename Check27, typename Check28, + typename Check29, typename Check30, typename Check31, typename Check32, + typename Action0, typename Action1, typename Action2, typename Action3, + typename Action4, typename Action5, typename Action6, typename Action7, + typename Action8, typename Action9, typename Action10, typename Action11, + typename Action12, typename Action13, typename Action14, typename Action15, + typename Action16, typename Action17, typename Action18, typename Action19, + typename Action20, typename Action21, typename Action22, typename Action23, + typename Action24, typename Action25, typename Action26, typename Action27, + typename Action28, typename Action29, typename Action30, typename Action31, + typename Action32> +auto IfList(CheckArg input, ActionArg action_arg, ActionFail action_fail, + Check0 check0, Check1 check1, Check2 check2, Check3 check3, + Check4 check4, Check5 check5, Check6 check6, Check7 check7, + Check8 check8, Check9 check9, Check10 check10, Check11 check11, + Check12 check12, Check13 check13, Check14 check14, Check15 check15, + Check16 check16, Check17 check17, Check18 check18, Check19 check19, + Check20 check20, Check21 check21, Check22 check22, Check23 check23, + Check24 check24, Check25 check25, Check26 check26, Check27 check27, + Check28 check28, Check29 check29, Check30 check30, Check31 check31, + Check32 check32, Action0 action0, Action1 action1, Action2 action2, + Action3 action3, Action4 action4, Action5 action5, Action6 action6, + Action7 action7, Action8 action8, Action9 action9, + Action10 action10, Action11 action11, Action12 action12, + Action13 action13, Action14 action14, Action15 action15, + Action16 action16, Action17 action17, Action18 action18, + Action19 action19, Action20 action20, Action21 action21, + Action22 action22, Action23 action23, Action24 action24, + Action25 action25, Action26 action26, Action27 action27, + Action28 action28, Action29 action29, Action30 action30, + Action31 action31, Action32 action32) { + if (check0(input)) return action0(action_arg); + if (check1(input)) return action1(action_arg); + if (check2(input)) return action2(action_arg); + if (check3(input)) return action3(action_arg); + if (check4(input)) return action4(action_arg); + if (check5(input)) return action5(action_arg); + if (check6(input)) return action6(action_arg); + if (check7(input)) return action7(action_arg); + if (check8(input)) return action8(action_arg); + if (check9(input)) return action9(action_arg); + if (check10(input)) return action10(action_arg); + if (check11(input)) return action11(action_arg); + if (check12(input)) return action12(action_arg); + if (check13(input)) return action13(action_arg); + if (check14(input)) return action14(action_arg); + if (check15(input)) return action15(action_arg); + if (check16(input)) return action16(action_arg); + if (check17(input)) return action17(action_arg); + if (check18(input)) return action18(action_arg); + if (check19(input)) return action19(action_arg); + if (check20(input)) return action20(action_arg); + if (check21(input)) return action21(action_arg); + if (check22(input)) return action22(action_arg); + if (check23(input)) return action23(action_arg); + if (check24(input)) return action24(action_arg); + if (check25(input)) return action25(action_arg); + if (check26(input)) return action26(action_arg); + if (check27(input)) return action27(action_arg); + if (check28(input)) return action28(action_arg); + if (check29(input)) return action29(action_arg); + if (check30(input)) return action30(action_arg); + if (check31(input)) return action31(action_arg); + if (check32(input)) return action32(action_arg); + return action_fail(action_arg); +} + +template < + typename CheckArg, typename ActionArg, typename ActionFail, typename Check0, + typename Check1, typename Check2, typename Check3, typename Check4, + typename Check5, typename Check6, typename Check7, typename Check8, + typename Check9, typename Check10, typename Check11, typename Check12, + typename Check13, typename Check14, typename Check15, typename Check16, + typename Check17, typename Check18, typename Check19, typename Check20, + typename Check21, typename Check22, typename Check23, typename Check24, + typename Check25, typename Check26, typename Check27, typename Check28, + typename Check29, typename Check30, typename Check31, typename Check32, + typename Check33, typename Action0, typename Action1, typename Action2, + typename Action3, typename Action4, typename Action5, typename Action6, + typename Action7, typename Action8, typename Action9, typename Action10, + typename Action11, typename Action12, typename Action13, typename Action14, + typename Action15, typename Action16, typename Action17, typename Action18, + typename Action19, typename Action20, typename Action21, typename Action22, + typename Action23, typename Action24, typename Action25, typename Action26, + typename Action27, typename Action28, typename Action29, typename Action30, + typename Action31, typename Action32, typename Action33> +auto IfList(CheckArg input, ActionArg action_arg, ActionFail action_fail, + Check0 check0, Check1 check1, Check2 check2, Check3 check3, + Check4 check4, Check5 check5, Check6 check6, Check7 check7, + Check8 check8, Check9 check9, Check10 check10, Check11 check11, + Check12 check12, Check13 check13, Check14 check14, Check15 check15, + Check16 check16, Check17 check17, Check18 check18, Check19 check19, + Check20 check20, Check21 check21, Check22 check22, Check23 check23, + Check24 check24, Check25 check25, Check26 check26, Check27 check27, + Check28 check28, Check29 check29, Check30 check30, Check31 check31, + Check32 check32, Check33 check33, Action0 action0, Action1 action1, + Action2 action2, Action3 action3, Action4 action4, Action5 action5, + Action6 action6, Action7 action7, Action8 action8, Action9 action9, + Action10 action10, Action11 action11, Action12 action12, + Action13 action13, Action14 action14, Action15 action15, + Action16 action16, Action17 action17, Action18 action18, + Action19 action19, Action20 action20, Action21 action21, + Action22 action22, Action23 action23, Action24 action24, + Action25 action25, Action26 action26, Action27 action27, + Action28 action28, Action29 action29, Action30 action30, + Action31 action31, Action32 action32, Action33 action33) { + if (check0(input)) return action0(action_arg); + if (check1(input)) return action1(action_arg); + if (check2(input)) return action2(action_arg); + if (check3(input)) return action3(action_arg); + if (check4(input)) return action4(action_arg); + if (check5(input)) return action5(action_arg); + if (check6(input)) return action6(action_arg); + if (check7(input)) return action7(action_arg); + if (check8(input)) return action8(action_arg); + if (check9(input)) return action9(action_arg); + if (check10(input)) return action10(action_arg); + if (check11(input)) return action11(action_arg); + if (check12(input)) return action12(action_arg); + if (check13(input)) return action13(action_arg); + if (check14(input)) return action14(action_arg); + if (check15(input)) return action15(action_arg); + if (check16(input)) return action16(action_arg); + if (check17(input)) return action17(action_arg); + if (check18(input)) return action18(action_arg); + if (check19(input)) return action19(action_arg); + if (check20(input)) return action20(action_arg); + if (check21(input)) return action21(action_arg); + if (check22(input)) return action22(action_arg); + if (check23(input)) return action23(action_arg); + if (check24(input)) return action24(action_arg); + if (check25(input)) return action25(action_arg); + if (check26(input)) return action26(action_arg); + if (check27(input)) return action27(action_arg); + if (check28(input)) return action28(action_arg); + if (check29(input)) return action29(action_arg); + if (check30(input)) return action30(action_arg); + if (check31(input)) return action31(action_arg); + if (check32(input)) return action32(action_arg); + if (check33(input)) return action33(action_arg); + return action_fail(action_arg); +} + +template < + typename CheckArg, typename ActionArg, typename ActionFail, typename Check0, + typename Check1, typename Check2, typename Check3, typename Check4, + typename Check5, typename Check6, typename Check7, typename Check8, + typename Check9, typename Check10, typename Check11, typename Check12, + typename Check13, typename Check14, typename Check15, typename Check16, + typename Check17, typename Check18, typename Check19, typename Check20, + typename Check21, typename Check22, typename Check23, typename Check24, + typename Check25, typename Check26, typename Check27, typename Check28, + typename Check29, typename Check30, typename Check31, typename Check32, + typename Check33, typename Check34, typename Action0, typename Action1, + typename Action2, typename Action3, typename Action4, typename Action5, + typename Action6, typename Action7, typename Action8, typename Action9, + typename Action10, typename Action11, typename Action12, typename Action13, + typename Action14, typename Action15, typename Action16, typename Action17, + typename Action18, typename Action19, typename Action20, typename Action21, + typename Action22, typename Action23, typename Action24, typename Action25, + typename Action26, typename Action27, typename Action28, typename Action29, + typename Action30, typename Action31, typename Action32, typename Action33, + typename Action34> +auto IfList(CheckArg input, ActionArg action_arg, ActionFail action_fail, + Check0 check0, Check1 check1, Check2 check2, Check3 check3, + Check4 check4, Check5 check5, Check6 check6, Check7 check7, + Check8 check8, Check9 check9, Check10 check10, Check11 check11, + Check12 check12, Check13 check13, Check14 check14, Check15 check15, + Check16 check16, Check17 check17, Check18 check18, Check19 check19, + Check20 check20, Check21 check21, Check22 check22, Check23 check23, + Check24 check24, Check25 check25, Check26 check26, Check27 check27, + Check28 check28, Check29 check29, Check30 check30, Check31 check31, + Check32 check32, Check33 check33, Check34 check34, Action0 action0, + Action1 action1, Action2 action2, Action3 action3, Action4 action4, + Action5 action5, Action6 action6, Action7 action7, Action8 action8, + Action9 action9, Action10 action10, Action11 action11, + Action12 action12, Action13 action13, Action14 action14, + Action15 action15, Action16 action16, Action17 action17, + Action18 action18, Action19 action19, Action20 action20, + Action21 action21, Action22 action22, Action23 action23, + Action24 action24, Action25 action25, Action26 action26, + Action27 action27, Action28 action28, Action29 action29, + Action30 action30, Action31 action31, Action32 action32, + Action33 action33, Action34 action34) { + if (check0(input)) return action0(action_arg); + if (check1(input)) return action1(action_arg); + if (check2(input)) return action2(action_arg); + if (check3(input)) return action3(action_arg); + if (check4(input)) return action4(action_arg); + if (check5(input)) return action5(action_arg); + if (check6(input)) return action6(action_arg); + if (check7(input)) return action7(action_arg); + if (check8(input)) return action8(action_arg); + if (check9(input)) return action9(action_arg); + if (check10(input)) return action10(action_arg); + if (check11(input)) return action11(action_arg); + if (check12(input)) return action12(action_arg); + if (check13(input)) return action13(action_arg); + if (check14(input)) return action14(action_arg); + if (check15(input)) return action15(action_arg); + if (check16(input)) return action16(action_arg); + if (check17(input)) return action17(action_arg); + if (check18(input)) return action18(action_arg); + if (check19(input)) return action19(action_arg); + if (check20(input)) return action20(action_arg); + if (check21(input)) return action21(action_arg); + if (check22(input)) return action22(action_arg); + if (check23(input)) return action23(action_arg); + if (check24(input)) return action24(action_arg); + if (check25(input)) return action25(action_arg); + if (check26(input)) return action26(action_arg); + if (check27(input)) return action27(action_arg); + if (check28(input)) return action28(action_arg); + if (check29(input)) return action29(action_arg); + if (check30(input)) return action30(action_arg); + if (check31(input)) return action31(action_arg); + if (check32(input)) return action32(action_arg); + if (check33(input)) return action33(action_arg); + if (check34(input)) return action34(action_arg); + return action_fail(action_arg); +} + +template < + typename CheckArg, typename ActionArg, typename ActionFail, typename Check0, + typename Check1, typename Check2, typename Check3, typename Check4, + typename Check5, typename Check6, typename Check7, typename Check8, + typename Check9, typename Check10, typename Check11, typename Check12, + typename Check13, typename Check14, typename Check15, typename Check16, + typename Check17, typename Check18, typename Check19, typename Check20, + typename Check21, typename Check22, typename Check23, typename Check24, + typename Check25, typename Check26, typename Check27, typename Check28, + typename Check29, typename Check30, typename Check31, typename Check32, + typename Check33, typename Check34, typename Check35, typename Action0, + typename Action1, typename Action2, typename Action3, typename Action4, + typename Action5, typename Action6, typename Action7, typename Action8, + typename Action9, typename Action10, typename Action11, typename Action12, + typename Action13, typename Action14, typename Action15, typename Action16, + typename Action17, typename Action18, typename Action19, typename Action20, + typename Action21, typename Action22, typename Action23, typename Action24, + typename Action25, typename Action26, typename Action27, typename Action28, + typename Action29, typename Action30, typename Action31, typename Action32, + typename Action33, typename Action34, typename Action35> +auto IfList(CheckArg input, ActionArg action_arg, ActionFail action_fail, + Check0 check0, Check1 check1, Check2 check2, Check3 check3, + Check4 check4, Check5 check5, Check6 check6, Check7 check7, + Check8 check8, Check9 check9, Check10 check10, Check11 check11, + Check12 check12, Check13 check13, Check14 check14, Check15 check15, + Check16 check16, Check17 check17, Check18 check18, Check19 check19, + Check20 check20, Check21 check21, Check22 check22, Check23 check23, + Check24 check24, Check25 check25, Check26 check26, Check27 check27, + Check28 check28, Check29 check29, Check30 check30, Check31 check31, + Check32 check32, Check33 check33, Check34 check34, Check35 check35, + Action0 action0, Action1 action1, Action2 action2, Action3 action3, + Action4 action4, Action5 action5, Action6 action6, Action7 action7, + Action8 action8, Action9 action9, Action10 action10, + Action11 action11, Action12 action12, Action13 action13, + Action14 action14, Action15 action15, Action16 action16, + Action17 action17, Action18 action18, Action19 action19, + Action20 action20, Action21 action21, Action22 action22, + Action23 action23, Action24 action24, Action25 action25, + Action26 action26, Action27 action27, Action28 action28, + Action29 action29, Action30 action30, Action31 action31, + Action32 action32, Action33 action33, Action34 action34, + Action35 action35) { + if (check0(input)) return action0(action_arg); + if (check1(input)) return action1(action_arg); + if (check2(input)) return action2(action_arg); + if (check3(input)) return action3(action_arg); + if (check4(input)) return action4(action_arg); + if (check5(input)) return action5(action_arg); + if (check6(input)) return action6(action_arg); + if (check7(input)) return action7(action_arg); + if (check8(input)) return action8(action_arg); + if (check9(input)) return action9(action_arg); + if (check10(input)) return action10(action_arg); + if (check11(input)) return action11(action_arg); + if (check12(input)) return action12(action_arg); + if (check13(input)) return action13(action_arg); + if (check14(input)) return action14(action_arg); + if (check15(input)) return action15(action_arg); + if (check16(input)) return action16(action_arg); + if (check17(input)) return action17(action_arg); + if (check18(input)) return action18(action_arg); + if (check19(input)) return action19(action_arg); + if (check20(input)) return action20(action_arg); + if (check21(input)) return action21(action_arg); + if (check22(input)) return action22(action_arg); + if (check23(input)) return action23(action_arg); + if (check24(input)) return action24(action_arg); + if (check25(input)) return action25(action_arg); + if (check26(input)) return action26(action_arg); + if (check27(input)) return action27(action_arg); + if (check28(input)) return action28(action_arg); + if (check29(input)) return action29(action_arg); + if (check30(input)) return action30(action_arg); + if (check31(input)) return action31(action_arg); + if (check32(input)) return action32(action_arg); + if (check33(input)) return action33(action_arg); + if (check34(input)) return action34(action_arg); + if (check35(input)) return action35(action_arg); + return action_fail(action_arg); +} + +template < + typename CheckArg, typename ActionArg, typename ActionFail, typename Check0, + typename Check1, typename Check2, typename Check3, typename Check4, + typename Check5, typename Check6, typename Check7, typename Check8, + typename Check9, typename Check10, typename Check11, typename Check12, + typename Check13, typename Check14, typename Check15, typename Check16, + typename Check17, typename Check18, typename Check19, typename Check20, + typename Check21, typename Check22, typename Check23, typename Check24, + typename Check25, typename Check26, typename Check27, typename Check28, + typename Check29, typename Check30, typename Check31, typename Check32, + typename Check33, typename Check34, typename Check35, typename Check36, + typename Action0, typename Action1, typename Action2, typename Action3, + typename Action4, typename Action5, typename Action6, typename Action7, + typename Action8, typename Action9, typename Action10, typename Action11, + typename Action12, typename Action13, typename Action14, typename Action15, + typename Action16, typename Action17, typename Action18, typename Action19, + typename Action20, typename Action21, typename Action22, typename Action23, + typename Action24, typename Action25, typename Action26, typename Action27, + typename Action28, typename Action29, typename Action30, typename Action31, + typename Action32, typename Action33, typename Action34, typename Action35, + typename Action36> +auto IfList(CheckArg input, ActionArg action_arg, ActionFail action_fail, + Check0 check0, Check1 check1, Check2 check2, Check3 check3, + Check4 check4, Check5 check5, Check6 check6, Check7 check7, + Check8 check8, Check9 check9, Check10 check10, Check11 check11, + Check12 check12, Check13 check13, Check14 check14, Check15 check15, + Check16 check16, Check17 check17, Check18 check18, Check19 check19, + Check20 check20, Check21 check21, Check22 check22, Check23 check23, + Check24 check24, Check25 check25, Check26 check26, Check27 check27, + Check28 check28, Check29 check29, Check30 check30, Check31 check31, + Check32 check32, Check33 check33, Check34 check34, Check35 check35, + Check36 check36, Action0 action0, Action1 action1, Action2 action2, + Action3 action3, Action4 action4, Action5 action5, Action6 action6, + Action7 action7, Action8 action8, Action9 action9, + Action10 action10, Action11 action11, Action12 action12, + Action13 action13, Action14 action14, Action15 action15, + Action16 action16, Action17 action17, Action18 action18, + Action19 action19, Action20 action20, Action21 action21, + Action22 action22, Action23 action23, Action24 action24, + Action25 action25, Action26 action26, Action27 action27, + Action28 action28, Action29 action29, Action30 action30, + Action31 action31, Action32 action32, Action33 action33, + Action34 action34, Action35 action35, Action36 action36) { + if (check0(input)) return action0(action_arg); + if (check1(input)) return action1(action_arg); + if (check2(input)) return action2(action_arg); + if (check3(input)) return action3(action_arg); + if (check4(input)) return action4(action_arg); + if (check5(input)) return action5(action_arg); + if (check6(input)) return action6(action_arg); + if (check7(input)) return action7(action_arg); + if (check8(input)) return action8(action_arg); + if (check9(input)) return action9(action_arg); + if (check10(input)) return action10(action_arg); + if (check11(input)) return action11(action_arg); + if (check12(input)) return action12(action_arg); + if (check13(input)) return action13(action_arg); + if (check14(input)) return action14(action_arg); + if (check15(input)) return action15(action_arg); + if (check16(input)) return action16(action_arg); + if (check17(input)) return action17(action_arg); + if (check18(input)) return action18(action_arg); + if (check19(input)) return action19(action_arg); + if (check20(input)) return action20(action_arg); + if (check21(input)) return action21(action_arg); + if (check22(input)) return action22(action_arg); + if (check23(input)) return action23(action_arg); + if (check24(input)) return action24(action_arg); + if (check25(input)) return action25(action_arg); + if (check26(input)) return action26(action_arg); + if (check27(input)) return action27(action_arg); + if (check28(input)) return action28(action_arg); + if (check29(input)) return action29(action_arg); + if (check30(input)) return action30(action_arg); + if (check31(input)) return action31(action_arg); + if (check32(input)) return action32(action_arg); + if (check33(input)) return action33(action_arg); + if (check34(input)) return action34(action_arg); + if (check35(input)) return action35(action_arg); + if (check36(input)) return action36(action_arg); + return action_fail(action_arg); +} + +template < + typename CheckArg, typename ActionArg, typename ActionFail, typename Check0, + typename Check1, typename Check2, typename Check3, typename Check4, + typename Check5, typename Check6, typename Check7, typename Check8, + typename Check9, typename Check10, typename Check11, typename Check12, + typename Check13, typename Check14, typename Check15, typename Check16, + typename Check17, typename Check18, typename Check19, typename Check20, + typename Check21, typename Check22, typename Check23, typename Check24, + typename Check25, typename Check26, typename Check27, typename Check28, + typename Check29, typename Check30, typename Check31, typename Check32, + typename Check33, typename Check34, typename Check35, typename Check36, + typename Check37, typename Action0, typename Action1, typename Action2, + typename Action3, typename Action4, typename Action5, typename Action6, + typename Action7, typename Action8, typename Action9, typename Action10, + typename Action11, typename Action12, typename Action13, typename Action14, + typename Action15, typename Action16, typename Action17, typename Action18, + typename Action19, typename Action20, typename Action21, typename Action22, + typename Action23, typename Action24, typename Action25, typename Action26, + typename Action27, typename Action28, typename Action29, typename Action30, + typename Action31, typename Action32, typename Action33, typename Action34, + typename Action35, typename Action36, typename Action37> +auto IfList(CheckArg input, ActionArg action_arg, ActionFail action_fail, + Check0 check0, Check1 check1, Check2 check2, Check3 check3, + Check4 check4, Check5 check5, Check6 check6, Check7 check7, + Check8 check8, Check9 check9, Check10 check10, Check11 check11, + Check12 check12, Check13 check13, Check14 check14, Check15 check15, + Check16 check16, Check17 check17, Check18 check18, Check19 check19, + Check20 check20, Check21 check21, Check22 check22, Check23 check23, + Check24 check24, Check25 check25, Check26 check26, Check27 check27, + Check28 check28, Check29 check29, Check30 check30, Check31 check31, + Check32 check32, Check33 check33, Check34 check34, Check35 check35, + Check36 check36, Check37 check37, Action0 action0, Action1 action1, + Action2 action2, Action3 action3, Action4 action4, Action5 action5, + Action6 action6, Action7 action7, Action8 action8, Action9 action9, + Action10 action10, Action11 action11, Action12 action12, + Action13 action13, Action14 action14, Action15 action15, + Action16 action16, Action17 action17, Action18 action18, + Action19 action19, Action20 action20, Action21 action21, + Action22 action22, Action23 action23, Action24 action24, + Action25 action25, Action26 action26, Action27 action27, + Action28 action28, Action29 action29, Action30 action30, + Action31 action31, Action32 action32, Action33 action33, + Action34 action34, Action35 action35, Action36 action36, + Action37 action37) { + if (check0(input)) return action0(action_arg); + if (check1(input)) return action1(action_arg); + if (check2(input)) return action2(action_arg); + if (check3(input)) return action3(action_arg); + if (check4(input)) return action4(action_arg); + if (check5(input)) return action5(action_arg); + if (check6(input)) return action6(action_arg); + if (check7(input)) return action7(action_arg); + if (check8(input)) return action8(action_arg); + if (check9(input)) return action9(action_arg); + if (check10(input)) return action10(action_arg); + if (check11(input)) return action11(action_arg); + if (check12(input)) return action12(action_arg); + if (check13(input)) return action13(action_arg); + if (check14(input)) return action14(action_arg); + if (check15(input)) return action15(action_arg); + if (check16(input)) return action16(action_arg); + if (check17(input)) return action17(action_arg); + if (check18(input)) return action18(action_arg); + if (check19(input)) return action19(action_arg); + if (check20(input)) return action20(action_arg); + if (check21(input)) return action21(action_arg); + if (check22(input)) return action22(action_arg); + if (check23(input)) return action23(action_arg); + if (check24(input)) return action24(action_arg); + if (check25(input)) return action25(action_arg); + if (check26(input)) return action26(action_arg); + if (check27(input)) return action27(action_arg); + if (check28(input)) return action28(action_arg); + if (check29(input)) return action29(action_arg); + if (check30(input)) return action30(action_arg); + if (check31(input)) return action31(action_arg); + if (check32(input)) return action32(action_arg); + if (check33(input)) return action33(action_arg); + if (check34(input)) return action34(action_arg); + if (check35(input)) return action35(action_arg); + if (check36(input)) return action36(action_arg); + if (check37(input)) return action37(action_arg); + return action_fail(action_arg); +} + +template < + typename CheckArg, typename ActionArg, typename ActionFail, typename Check0, + typename Check1, typename Check2, typename Check3, typename Check4, + typename Check5, typename Check6, typename Check7, typename Check8, + typename Check9, typename Check10, typename Check11, typename Check12, + typename Check13, typename Check14, typename Check15, typename Check16, + typename Check17, typename Check18, typename Check19, typename Check20, + typename Check21, typename Check22, typename Check23, typename Check24, + typename Check25, typename Check26, typename Check27, typename Check28, + typename Check29, typename Check30, typename Check31, typename Check32, + typename Check33, typename Check34, typename Check35, typename Check36, + typename Check37, typename Check38, typename Action0, typename Action1, + typename Action2, typename Action3, typename Action4, typename Action5, + typename Action6, typename Action7, typename Action8, typename Action9, + typename Action10, typename Action11, typename Action12, typename Action13, + typename Action14, typename Action15, typename Action16, typename Action17, + typename Action18, typename Action19, typename Action20, typename Action21, + typename Action22, typename Action23, typename Action24, typename Action25, + typename Action26, typename Action27, typename Action28, typename Action29, + typename Action30, typename Action31, typename Action32, typename Action33, + typename Action34, typename Action35, typename Action36, typename Action37, + typename Action38> +auto IfList(CheckArg input, ActionArg action_arg, ActionFail action_fail, + Check0 check0, Check1 check1, Check2 check2, Check3 check3, + Check4 check4, Check5 check5, Check6 check6, Check7 check7, + Check8 check8, Check9 check9, Check10 check10, Check11 check11, + Check12 check12, Check13 check13, Check14 check14, Check15 check15, + Check16 check16, Check17 check17, Check18 check18, Check19 check19, + Check20 check20, Check21 check21, Check22 check22, Check23 check23, + Check24 check24, Check25 check25, Check26 check26, Check27 check27, + Check28 check28, Check29 check29, Check30 check30, Check31 check31, + Check32 check32, Check33 check33, Check34 check34, Check35 check35, + Check36 check36, Check37 check37, Check38 check38, Action0 action0, + Action1 action1, Action2 action2, Action3 action3, Action4 action4, + Action5 action5, Action6 action6, Action7 action7, Action8 action8, + Action9 action9, Action10 action10, Action11 action11, + Action12 action12, Action13 action13, Action14 action14, + Action15 action15, Action16 action16, Action17 action17, + Action18 action18, Action19 action19, Action20 action20, + Action21 action21, Action22 action22, Action23 action23, + Action24 action24, Action25 action25, Action26 action26, + Action27 action27, Action28 action28, Action29 action29, + Action30 action30, Action31 action31, Action32 action32, + Action33 action33, Action34 action34, Action35 action35, + Action36 action36, Action37 action37, Action38 action38) { + if (check0(input)) return action0(action_arg); + if (check1(input)) return action1(action_arg); + if (check2(input)) return action2(action_arg); + if (check3(input)) return action3(action_arg); + if (check4(input)) return action4(action_arg); + if (check5(input)) return action5(action_arg); + if (check6(input)) return action6(action_arg); + if (check7(input)) return action7(action_arg); + if (check8(input)) return action8(action_arg); + if (check9(input)) return action9(action_arg); + if (check10(input)) return action10(action_arg); + if (check11(input)) return action11(action_arg); + if (check12(input)) return action12(action_arg); + if (check13(input)) return action13(action_arg); + if (check14(input)) return action14(action_arg); + if (check15(input)) return action15(action_arg); + if (check16(input)) return action16(action_arg); + if (check17(input)) return action17(action_arg); + if (check18(input)) return action18(action_arg); + if (check19(input)) return action19(action_arg); + if (check20(input)) return action20(action_arg); + if (check21(input)) return action21(action_arg); + if (check22(input)) return action22(action_arg); + if (check23(input)) return action23(action_arg); + if (check24(input)) return action24(action_arg); + if (check25(input)) return action25(action_arg); + if (check26(input)) return action26(action_arg); + if (check27(input)) return action27(action_arg); + if (check28(input)) return action28(action_arg); + if (check29(input)) return action29(action_arg); + if (check30(input)) return action30(action_arg); + if (check31(input)) return action31(action_arg); + if (check32(input)) return action32(action_arg); + if (check33(input)) return action33(action_arg); + if (check34(input)) return action34(action_arg); + if (check35(input)) return action35(action_arg); + if (check36(input)) return action36(action_arg); + if (check37(input)) return action37(action_arg); + if (check38(input)) return action38(action_arg); + return action_fail(action_arg); +} + +template < + typename CheckArg, typename ActionArg, typename ActionFail, typename Check0, + typename Check1, typename Check2, typename Check3, typename Check4, + typename Check5, typename Check6, typename Check7, typename Check8, + typename Check9, typename Check10, typename Check11, typename Check12, + typename Check13, typename Check14, typename Check15, typename Check16, + typename Check17, typename Check18, typename Check19, typename Check20, + typename Check21, typename Check22, typename Check23, typename Check24, + typename Check25, typename Check26, typename Check27, typename Check28, + typename Check29, typename Check30, typename Check31, typename Check32, + typename Check33, typename Check34, typename Check35, typename Check36, + typename Check37, typename Check38, typename Check39, typename Action0, + typename Action1, typename Action2, typename Action3, typename Action4, + typename Action5, typename Action6, typename Action7, typename Action8, + typename Action9, typename Action10, typename Action11, typename Action12, + typename Action13, typename Action14, typename Action15, typename Action16, + typename Action17, typename Action18, typename Action19, typename Action20, + typename Action21, typename Action22, typename Action23, typename Action24, + typename Action25, typename Action26, typename Action27, typename Action28, + typename Action29, typename Action30, typename Action31, typename Action32, + typename Action33, typename Action34, typename Action35, typename Action36, + typename Action37, typename Action38, typename Action39> +auto IfList(CheckArg input, ActionArg action_arg, ActionFail action_fail, + Check0 check0, Check1 check1, Check2 check2, Check3 check3, + Check4 check4, Check5 check5, Check6 check6, Check7 check7, + Check8 check8, Check9 check9, Check10 check10, Check11 check11, + Check12 check12, Check13 check13, Check14 check14, Check15 check15, + Check16 check16, Check17 check17, Check18 check18, Check19 check19, + Check20 check20, Check21 check21, Check22 check22, Check23 check23, + Check24 check24, Check25 check25, Check26 check26, Check27 check27, + Check28 check28, Check29 check29, Check30 check30, Check31 check31, + Check32 check32, Check33 check33, Check34 check34, Check35 check35, + Check36 check36, Check37 check37, Check38 check38, Check39 check39, + Action0 action0, Action1 action1, Action2 action2, Action3 action3, + Action4 action4, Action5 action5, Action6 action6, Action7 action7, + Action8 action8, Action9 action9, Action10 action10, + Action11 action11, Action12 action12, Action13 action13, + Action14 action14, Action15 action15, Action16 action16, + Action17 action17, Action18 action18, Action19 action19, + Action20 action20, Action21 action21, Action22 action22, + Action23 action23, Action24 action24, Action25 action25, + Action26 action26, Action27 action27, Action28 action28, + Action29 action29, Action30 action30, Action31 action31, + Action32 action32, Action33 action33, Action34 action34, + Action35 action35, Action36 action36, Action37 action37, + Action38 action38, Action39 action39) { + if (check0(input)) return action0(action_arg); + if (check1(input)) return action1(action_arg); + if (check2(input)) return action2(action_arg); + if (check3(input)) return action3(action_arg); + if (check4(input)) return action4(action_arg); + if (check5(input)) return action5(action_arg); + if (check6(input)) return action6(action_arg); + if (check7(input)) return action7(action_arg); + if (check8(input)) return action8(action_arg); + if (check9(input)) return action9(action_arg); + if (check10(input)) return action10(action_arg); + if (check11(input)) return action11(action_arg); + if (check12(input)) return action12(action_arg); + if (check13(input)) return action13(action_arg); + if (check14(input)) return action14(action_arg); + if (check15(input)) return action15(action_arg); + if (check16(input)) return action16(action_arg); + if (check17(input)) return action17(action_arg); + if (check18(input)) return action18(action_arg); + if (check19(input)) return action19(action_arg); + if (check20(input)) return action20(action_arg); + if (check21(input)) return action21(action_arg); + if (check22(input)) return action22(action_arg); + if (check23(input)) return action23(action_arg); + if (check24(input)) return action24(action_arg); + if (check25(input)) return action25(action_arg); + if (check26(input)) return action26(action_arg); + if (check27(input)) return action27(action_arg); + if (check28(input)) return action28(action_arg); + if (check29(input)) return action29(action_arg); + if (check30(input)) return action30(action_arg); + if (check31(input)) return action31(action_arg); + if (check32(input)) return action32(action_arg); + if (check33(input)) return action33(action_arg); + if (check34(input)) return action34(action_arg); + if (check35(input)) return action35(action_arg); + if (check36(input)) return action36(action_arg); + if (check37(input)) return action37(action_arg); + if (check38(input)) return action38(action_arg); + if (check39(input)) return action39(action_arg); + return action_fail(action_arg); +} + +template < + typename CheckArg, typename ActionArg, typename ActionFail, typename Check0, + typename Check1, typename Check2, typename Check3, typename Check4, + typename Check5, typename Check6, typename Check7, typename Check8, + typename Check9, typename Check10, typename Check11, typename Check12, + typename Check13, typename Check14, typename Check15, typename Check16, + typename Check17, typename Check18, typename Check19, typename Check20, + typename Check21, typename Check22, typename Check23, typename Check24, + typename Check25, typename Check26, typename Check27, typename Check28, + typename Check29, typename Check30, typename Check31, typename Check32, + typename Check33, typename Check34, typename Check35, typename Check36, + typename Check37, typename Check38, typename Check39, typename Check40, + typename Action0, typename Action1, typename Action2, typename Action3, + typename Action4, typename Action5, typename Action6, typename Action7, + typename Action8, typename Action9, typename Action10, typename Action11, + typename Action12, typename Action13, typename Action14, typename Action15, + typename Action16, typename Action17, typename Action18, typename Action19, + typename Action20, typename Action21, typename Action22, typename Action23, + typename Action24, typename Action25, typename Action26, typename Action27, + typename Action28, typename Action29, typename Action30, typename Action31, + typename Action32, typename Action33, typename Action34, typename Action35, + typename Action36, typename Action37, typename Action38, typename Action39, + typename Action40> +auto IfList( + CheckArg input, ActionArg action_arg, ActionFail action_fail, Check0 check0, + Check1 check1, Check2 check2, Check3 check3, Check4 check4, Check5 check5, + Check6 check6, Check7 check7, Check8 check8, Check9 check9, Check10 check10, + Check11 check11, Check12 check12, Check13 check13, Check14 check14, + Check15 check15, Check16 check16, Check17 check17, Check18 check18, + Check19 check19, Check20 check20, Check21 check21, Check22 check22, + Check23 check23, Check24 check24, Check25 check25, Check26 check26, + Check27 check27, Check28 check28, Check29 check29, Check30 check30, + Check31 check31, Check32 check32, Check33 check33, Check34 check34, + Check35 check35, Check36 check36, Check37 check37, Check38 check38, + Check39 check39, Check40 check40, Action0 action0, Action1 action1, + Action2 action2, Action3 action3, Action4 action4, Action5 action5, + Action6 action6, Action7 action7, Action8 action8, Action9 action9, + Action10 action10, Action11 action11, Action12 action12, Action13 action13, + Action14 action14, Action15 action15, Action16 action16, Action17 action17, + Action18 action18, Action19 action19, Action20 action20, Action21 action21, + Action22 action22, Action23 action23, Action24 action24, Action25 action25, + Action26 action26, Action27 action27, Action28 action28, Action29 action29, + Action30 action30, Action31 action31, Action32 action32, Action33 action33, + Action34 action34, Action35 action35, Action36 action36, Action37 action37, + Action38 action38, Action39 action39, Action40 action40) { + if (check0(input)) return action0(action_arg); + if (check1(input)) return action1(action_arg); + if (check2(input)) return action2(action_arg); + if (check3(input)) return action3(action_arg); + if (check4(input)) return action4(action_arg); + if (check5(input)) return action5(action_arg); + if (check6(input)) return action6(action_arg); + if (check7(input)) return action7(action_arg); + if (check8(input)) return action8(action_arg); + if (check9(input)) return action9(action_arg); + if (check10(input)) return action10(action_arg); + if (check11(input)) return action11(action_arg); + if (check12(input)) return action12(action_arg); + if (check13(input)) return action13(action_arg); + if (check14(input)) return action14(action_arg); + if (check15(input)) return action15(action_arg); + if (check16(input)) return action16(action_arg); + if (check17(input)) return action17(action_arg); + if (check18(input)) return action18(action_arg); + if (check19(input)) return action19(action_arg); + if (check20(input)) return action20(action_arg); + if (check21(input)) return action21(action_arg); + if (check22(input)) return action22(action_arg); + if (check23(input)) return action23(action_arg); + if (check24(input)) return action24(action_arg); + if (check25(input)) return action25(action_arg); + if (check26(input)) return action26(action_arg); + if (check27(input)) return action27(action_arg); + if (check28(input)) return action28(action_arg); + if (check29(input)) return action29(action_arg); + if (check30(input)) return action30(action_arg); + if (check31(input)) return action31(action_arg); + if (check32(input)) return action32(action_arg); + if (check33(input)) return action33(action_arg); + if (check34(input)) return action34(action_arg); + if (check35(input)) return action35(action_arg); + if (check36(input)) return action36(action_arg); + if (check37(input)) return action37(action_arg); + if (check38(input)) return action38(action_arg); + if (check39(input)) return action39(action_arg); + if (check40(input)) return action40(action_arg); + return action_fail(action_arg); +} + +template < + typename CheckArg, typename ActionArg, typename ActionFail, typename Check0, + typename Check1, typename Check2, typename Check3, typename Check4, + typename Check5, typename Check6, typename Check7, typename Check8, + typename Check9, typename Check10, typename Check11, typename Check12, + typename Check13, typename Check14, typename Check15, typename Check16, + typename Check17, typename Check18, typename Check19, typename Check20, + typename Check21, typename Check22, typename Check23, typename Check24, + typename Check25, typename Check26, typename Check27, typename Check28, + typename Check29, typename Check30, typename Check31, typename Check32, + typename Check33, typename Check34, typename Check35, typename Check36, + typename Check37, typename Check38, typename Check39, typename Check40, + typename Check41, typename Action0, typename Action1, typename Action2, + typename Action3, typename Action4, typename Action5, typename Action6, + typename Action7, typename Action8, typename Action9, typename Action10, + typename Action11, typename Action12, typename Action13, typename Action14, + typename Action15, typename Action16, typename Action17, typename Action18, + typename Action19, typename Action20, typename Action21, typename Action22, + typename Action23, typename Action24, typename Action25, typename Action26, + typename Action27, typename Action28, typename Action29, typename Action30, + typename Action31, typename Action32, typename Action33, typename Action34, + typename Action35, typename Action36, typename Action37, typename Action38, + typename Action39, typename Action40, typename Action41> +auto IfList(CheckArg input, ActionArg action_arg, ActionFail action_fail, + Check0 check0, Check1 check1, Check2 check2, Check3 check3, + Check4 check4, Check5 check5, Check6 check6, Check7 check7, + Check8 check8, Check9 check9, Check10 check10, Check11 check11, + Check12 check12, Check13 check13, Check14 check14, Check15 check15, + Check16 check16, Check17 check17, Check18 check18, Check19 check19, + Check20 check20, Check21 check21, Check22 check22, Check23 check23, + Check24 check24, Check25 check25, Check26 check26, Check27 check27, + Check28 check28, Check29 check29, Check30 check30, Check31 check31, + Check32 check32, Check33 check33, Check34 check34, Check35 check35, + Check36 check36, Check37 check37, Check38 check38, Check39 check39, + Check40 check40, Check41 check41, Action0 action0, Action1 action1, + Action2 action2, Action3 action3, Action4 action4, Action5 action5, + Action6 action6, Action7 action7, Action8 action8, Action9 action9, + Action10 action10, Action11 action11, Action12 action12, + Action13 action13, Action14 action14, Action15 action15, + Action16 action16, Action17 action17, Action18 action18, + Action19 action19, Action20 action20, Action21 action21, + Action22 action22, Action23 action23, Action24 action24, + Action25 action25, Action26 action26, Action27 action27, + Action28 action28, Action29 action29, Action30 action30, + Action31 action31, Action32 action32, Action33 action33, + Action34 action34, Action35 action35, Action36 action36, + Action37 action37, Action38 action38, Action39 action39, + Action40 action40, Action41 action41) { + if (check0(input)) return action0(action_arg); + if (check1(input)) return action1(action_arg); + if (check2(input)) return action2(action_arg); + if (check3(input)) return action3(action_arg); + if (check4(input)) return action4(action_arg); + if (check5(input)) return action5(action_arg); + if (check6(input)) return action6(action_arg); + if (check7(input)) return action7(action_arg); + if (check8(input)) return action8(action_arg); + if (check9(input)) return action9(action_arg); + if (check10(input)) return action10(action_arg); + if (check11(input)) return action11(action_arg); + if (check12(input)) return action12(action_arg); + if (check13(input)) return action13(action_arg); + if (check14(input)) return action14(action_arg); + if (check15(input)) return action15(action_arg); + if (check16(input)) return action16(action_arg); + if (check17(input)) return action17(action_arg); + if (check18(input)) return action18(action_arg); + if (check19(input)) return action19(action_arg); + if (check20(input)) return action20(action_arg); + if (check21(input)) return action21(action_arg); + if (check22(input)) return action22(action_arg); + if (check23(input)) return action23(action_arg); + if (check24(input)) return action24(action_arg); + if (check25(input)) return action25(action_arg); + if (check26(input)) return action26(action_arg); + if (check27(input)) return action27(action_arg); + if (check28(input)) return action28(action_arg); + if (check29(input)) return action29(action_arg); + if (check30(input)) return action30(action_arg); + if (check31(input)) return action31(action_arg); + if (check32(input)) return action32(action_arg); + if (check33(input)) return action33(action_arg); + if (check34(input)) return action34(action_arg); + if (check35(input)) return action35(action_arg); + if (check36(input)) return action36(action_arg); + if (check37(input)) return action37(action_arg); + if (check38(input)) return action38(action_arg); + if (check39(input)) return action39(action_arg); + if (check40(input)) return action40(action_arg); + if (check41(input)) return action41(action_arg); + return action_fail(action_arg); +} + +template < + typename CheckArg, typename ActionArg, typename ActionFail, typename Check0, + typename Check1, typename Check2, typename Check3, typename Check4, + typename Check5, typename Check6, typename Check7, typename Check8, + typename Check9, typename Check10, typename Check11, typename Check12, + typename Check13, typename Check14, typename Check15, typename Check16, + typename Check17, typename Check18, typename Check19, typename Check20, + typename Check21, typename Check22, typename Check23, typename Check24, + typename Check25, typename Check26, typename Check27, typename Check28, + typename Check29, typename Check30, typename Check31, typename Check32, + typename Check33, typename Check34, typename Check35, typename Check36, + typename Check37, typename Check38, typename Check39, typename Check40, + typename Check41, typename Check42, typename Action0, typename Action1, + typename Action2, typename Action3, typename Action4, typename Action5, + typename Action6, typename Action7, typename Action8, typename Action9, + typename Action10, typename Action11, typename Action12, typename Action13, + typename Action14, typename Action15, typename Action16, typename Action17, + typename Action18, typename Action19, typename Action20, typename Action21, + typename Action22, typename Action23, typename Action24, typename Action25, + typename Action26, typename Action27, typename Action28, typename Action29, + typename Action30, typename Action31, typename Action32, typename Action33, + typename Action34, typename Action35, typename Action36, typename Action37, + typename Action38, typename Action39, typename Action40, typename Action41, + typename Action42> +auto IfList( + CheckArg input, ActionArg action_arg, ActionFail action_fail, Check0 check0, + Check1 check1, Check2 check2, Check3 check3, Check4 check4, Check5 check5, + Check6 check6, Check7 check7, Check8 check8, Check9 check9, Check10 check10, + Check11 check11, Check12 check12, Check13 check13, Check14 check14, + Check15 check15, Check16 check16, Check17 check17, Check18 check18, + Check19 check19, Check20 check20, Check21 check21, Check22 check22, + Check23 check23, Check24 check24, Check25 check25, Check26 check26, + Check27 check27, Check28 check28, Check29 check29, Check30 check30, + Check31 check31, Check32 check32, Check33 check33, Check34 check34, + Check35 check35, Check36 check36, Check37 check37, Check38 check38, + Check39 check39, Check40 check40, Check41 check41, Check42 check42, + Action0 action0, Action1 action1, Action2 action2, Action3 action3, + Action4 action4, Action5 action5, Action6 action6, Action7 action7, + Action8 action8, Action9 action9, Action10 action10, Action11 action11, + Action12 action12, Action13 action13, Action14 action14, Action15 action15, + Action16 action16, Action17 action17, Action18 action18, Action19 action19, + Action20 action20, Action21 action21, Action22 action22, Action23 action23, + Action24 action24, Action25 action25, Action26 action26, Action27 action27, + Action28 action28, Action29 action29, Action30 action30, Action31 action31, + Action32 action32, Action33 action33, Action34 action34, Action35 action35, + Action36 action36, Action37 action37, Action38 action38, Action39 action39, + Action40 action40, Action41 action41, Action42 action42) { + if (check0(input)) return action0(action_arg); + if (check1(input)) return action1(action_arg); + if (check2(input)) return action2(action_arg); + if (check3(input)) return action3(action_arg); + if (check4(input)) return action4(action_arg); + if (check5(input)) return action5(action_arg); + if (check6(input)) return action6(action_arg); + if (check7(input)) return action7(action_arg); + if (check8(input)) return action8(action_arg); + if (check9(input)) return action9(action_arg); + if (check10(input)) return action10(action_arg); + if (check11(input)) return action11(action_arg); + if (check12(input)) return action12(action_arg); + if (check13(input)) return action13(action_arg); + if (check14(input)) return action14(action_arg); + if (check15(input)) return action15(action_arg); + if (check16(input)) return action16(action_arg); + if (check17(input)) return action17(action_arg); + if (check18(input)) return action18(action_arg); + if (check19(input)) return action19(action_arg); + if (check20(input)) return action20(action_arg); + if (check21(input)) return action21(action_arg); + if (check22(input)) return action22(action_arg); + if (check23(input)) return action23(action_arg); + if (check24(input)) return action24(action_arg); + if (check25(input)) return action25(action_arg); + if (check26(input)) return action26(action_arg); + if (check27(input)) return action27(action_arg); + if (check28(input)) return action28(action_arg); + if (check29(input)) return action29(action_arg); + if (check30(input)) return action30(action_arg); + if (check31(input)) return action31(action_arg); + if (check32(input)) return action32(action_arg); + if (check33(input)) return action33(action_arg); + if (check34(input)) return action34(action_arg); + if (check35(input)) return action35(action_arg); + if (check36(input)) return action36(action_arg); + if (check37(input)) return action37(action_arg); + if (check38(input)) return action38(action_arg); + if (check39(input)) return action39(action_arg); + if (check40(input)) return action40(action_arg); + if (check41(input)) return action41(action_arg); + if (check42(input)) return action42(action_arg); + return action_fail(action_arg); +} + +template < + typename CheckArg, typename ActionArg, typename ActionFail, typename Check0, + typename Check1, typename Check2, typename Check3, typename Check4, + typename Check5, typename Check6, typename Check7, typename Check8, + typename Check9, typename Check10, typename Check11, typename Check12, + typename Check13, typename Check14, typename Check15, typename Check16, + typename Check17, typename Check18, typename Check19, typename Check20, + typename Check21, typename Check22, typename Check23, typename Check24, + typename Check25, typename Check26, typename Check27, typename Check28, + typename Check29, typename Check30, typename Check31, typename Check32, + typename Check33, typename Check34, typename Check35, typename Check36, + typename Check37, typename Check38, typename Check39, typename Check40, + typename Check41, typename Check42, typename Check43, typename Action0, + typename Action1, typename Action2, typename Action3, typename Action4, + typename Action5, typename Action6, typename Action7, typename Action8, + typename Action9, typename Action10, typename Action11, typename Action12, + typename Action13, typename Action14, typename Action15, typename Action16, + typename Action17, typename Action18, typename Action19, typename Action20, + typename Action21, typename Action22, typename Action23, typename Action24, + typename Action25, typename Action26, typename Action27, typename Action28, + typename Action29, typename Action30, typename Action31, typename Action32, + typename Action33, typename Action34, typename Action35, typename Action36, + typename Action37, typename Action38, typename Action39, typename Action40, + typename Action41, typename Action42, typename Action43> +auto IfList(CheckArg input, ActionArg action_arg, ActionFail action_fail, + Check0 check0, Check1 check1, Check2 check2, Check3 check3, + Check4 check4, Check5 check5, Check6 check6, Check7 check7, + Check8 check8, Check9 check9, Check10 check10, Check11 check11, + Check12 check12, Check13 check13, Check14 check14, Check15 check15, + Check16 check16, Check17 check17, Check18 check18, Check19 check19, + Check20 check20, Check21 check21, Check22 check22, Check23 check23, + Check24 check24, Check25 check25, Check26 check26, Check27 check27, + Check28 check28, Check29 check29, Check30 check30, Check31 check31, + Check32 check32, Check33 check33, Check34 check34, Check35 check35, + Check36 check36, Check37 check37, Check38 check38, Check39 check39, + Check40 check40, Check41 check41, Check42 check42, Check43 check43, + Action0 action0, Action1 action1, Action2 action2, Action3 action3, + Action4 action4, Action5 action5, Action6 action6, Action7 action7, + Action8 action8, Action9 action9, Action10 action10, + Action11 action11, Action12 action12, Action13 action13, + Action14 action14, Action15 action15, Action16 action16, + Action17 action17, Action18 action18, Action19 action19, + Action20 action20, Action21 action21, Action22 action22, + Action23 action23, Action24 action24, Action25 action25, + Action26 action26, Action27 action27, Action28 action28, + Action29 action29, Action30 action30, Action31 action31, + Action32 action32, Action33 action33, Action34 action34, + Action35 action35, Action36 action36, Action37 action37, + Action38 action38, Action39 action39, Action40 action40, + Action41 action41, Action42 action42, Action43 action43) { + if (check0(input)) return action0(action_arg); + if (check1(input)) return action1(action_arg); + if (check2(input)) return action2(action_arg); + if (check3(input)) return action3(action_arg); + if (check4(input)) return action4(action_arg); + if (check5(input)) return action5(action_arg); + if (check6(input)) return action6(action_arg); + if (check7(input)) return action7(action_arg); + if (check8(input)) return action8(action_arg); + if (check9(input)) return action9(action_arg); + if (check10(input)) return action10(action_arg); + if (check11(input)) return action11(action_arg); + if (check12(input)) return action12(action_arg); + if (check13(input)) return action13(action_arg); + if (check14(input)) return action14(action_arg); + if (check15(input)) return action15(action_arg); + if (check16(input)) return action16(action_arg); + if (check17(input)) return action17(action_arg); + if (check18(input)) return action18(action_arg); + if (check19(input)) return action19(action_arg); + if (check20(input)) return action20(action_arg); + if (check21(input)) return action21(action_arg); + if (check22(input)) return action22(action_arg); + if (check23(input)) return action23(action_arg); + if (check24(input)) return action24(action_arg); + if (check25(input)) return action25(action_arg); + if (check26(input)) return action26(action_arg); + if (check27(input)) return action27(action_arg); + if (check28(input)) return action28(action_arg); + if (check29(input)) return action29(action_arg); + if (check30(input)) return action30(action_arg); + if (check31(input)) return action31(action_arg); + if (check32(input)) return action32(action_arg); + if (check33(input)) return action33(action_arg); + if (check34(input)) return action34(action_arg); + if (check35(input)) return action35(action_arg); + if (check36(input)) return action36(action_arg); + if (check37(input)) return action37(action_arg); + if (check38(input)) return action38(action_arg); + if (check39(input)) return action39(action_arg); + if (check40(input)) return action40(action_arg); + if (check41(input)) return action41(action_arg); + if (check42(input)) return action42(action_arg); + if (check43(input)) return action43(action_arg); + return action_fail(action_arg); +} + +template < + typename CheckArg, typename ActionArg, typename ActionFail, typename Check0, + typename Check1, typename Check2, typename Check3, typename Check4, + typename Check5, typename Check6, typename Check7, typename Check8, + typename Check9, typename Check10, typename Check11, typename Check12, + typename Check13, typename Check14, typename Check15, typename Check16, + typename Check17, typename Check18, typename Check19, typename Check20, + typename Check21, typename Check22, typename Check23, typename Check24, + typename Check25, typename Check26, typename Check27, typename Check28, + typename Check29, typename Check30, typename Check31, typename Check32, + typename Check33, typename Check34, typename Check35, typename Check36, + typename Check37, typename Check38, typename Check39, typename Check40, + typename Check41, typename Check42, typename Check43, typename Check44, + typename Action0, typename Action1, typename Action2, typename Action3, + typename Action4, typename Action5, typename Action6, typename Action7, + typename Action8, typename Action9, typename Action10, typename Action11, + typename Action12, typename Action13, typename Action14, typename Action15, + typename Action16, typename Action17, typename Action18, typename Action19, + typename Action20, typename Action21, typename Action22, typename Action23, + typename Action24, typename Action25, typename Action26, typename Action27, + typename Action28, typename Action29, typename Action30, typename Action31, + typename Action32, typename Action33, typename Action34, typename Action35, + typename Action36, typename Action37, typename Action38, typename Action39, + typename Action40, typename Action41, typename Action42, typename Action43, + typename Action44> +auto IfList( + CheckArg input, ActionArg action_arg, ActionFail action_fail, Check0 check0, + Check1 check1, Check2 check2, Check3 check3, Check4 check4, Check5 check5, + Check6 check6, Check7 check7, Check8 check8, Check9 check9, Check10 check10, + Check11 check11, Check12 check12, Check13 check13, Check14 check14, + Check15 check15, Check16 check16, Check17 check17, Check18 check18, + Check19 check19, Check20 check20, Check21 check21, Check22 check22, + Check23 check23, Check24 check24, Check25 check25, Check26 check26, + Check27 check27, Check28 check28, Check29 check29, Check30 check30, + Check31 check31, Check32 check32, Check33 check33, Check34 check34, + Check35 check35, Check36 check36, Check37 check37, Check38 check38, + Check39 check39, Check40 check40, Check41 check41, Check42 check42, + Check43 check43, Check44 check44, Action0 action0, Action1 action1, + Action2 action2, Action3 action3, Action4 action4, Action5 action5, + Action6 action6, Action7 action7, Action8 action8, Action9 action9, + Action10 action10, Action11 action11, Action12 action12, Action13 action13, + Action14 action14, Action15 action15, Action16 action16, Action17 action17, + Action18 action18, Action19 action19, Action20 action20, Action21 action21, + Action22 action22, Action23 action23, Action24 action24, Action25 action25, + Action26 action26, Action27 action27, Action28 action28, Action29 action29, + Action30 action30, Action31 action31, Action32 action32, Action33 action33, + Action34 action34, Action35 action35, Action36 action36, Action37 action37, + Action38 action38, Action39 action39, Action40 action40, Action41 action41, + Action42 action42, Action43 action43, Action44 action44) { + if (check0(input)) return action0(action_arg); + if (check1(input)) return action1(action_arg); + if (check2(input)) return action2(action_arg); + if (check3(input)) return action3(action_arg); + if (check4(input)) return action4(action_arg); + if (check5(input)) return action5(action_arg); + if (check6(input)) return action6(action_arg); + if (check7(input)) return action7(action_arg); + if (check8(input)) return action8(action_arg); + if (check9(input)) return action9(action_arg); + if (check10(input)) return action10(action_arg); + if (check11(input)) return action11(action_arg); + if (check12(input)) return action12(action_arg); + if (check13(input)) return action13(action_arg); + if (check14(input)) return action14(action_arg); + if (check15(input)) return action15(action_arg); + if (check16(input)) return action16(action_arg); + if (check17(input)) return action17(action_arg); + if (check18(input)) return action18(action_arg); + if (check19(input)) return action19(action_arg); + if (check20(input)) return action20(action_arg); + if (check21(input)) return action21(action_arg); + if (check22(input)) return action22(action_arg); + if (check23(input)) return action23(action_arg); + if (check24(input)) return action24(action_arg); + if (check25(input)) return action25(action_arg); + if (check26(input)) return action26(action_arg); + if (check27(input)) return action27(action_arg); + if (check28(input)) return action28(action_arg); + if (check29(input)) return action29(action_arg); + if (check30(input)) return action30(action_arg); + if (check31(input)) return action31(action_arg); + if (check32(input)) return action32(action_arg); + if (check33(input)) return action33(action_arg); + if (check34(input)) return action34(action_arg); + if (check35(input)) return action35(action_arg); + if (check36(input)) return action36(action_arg); + if (check37(input)) return action37(action_arg); + if (check38(input)) return action38(action_arg); + if (check39(input)) return action39(action_arg); + if (check40(input)) return action40(action_arg); + if (check41(input)) return action41(action_arg); + if (check42(input)) return action42(action_arg); + if (check43(input)) return action43(action_arg); + if (check44(input)) return action44(action_arg); + return action_fail(action_arg); +} + +template < + typename CheckArg, typename ActionArg, typename ActionFail, typename Check0, + typename Check1, typename Check2, typename Check3, typename Check4, + typename Check5, typename Check6, typename Check7, typename Check8, + typename Check9, typename Check10, typename Check11, typename Check12, + typename Check13, typename Check14, typename Check15, typename Check16, + typename Check17, typename Check18, typename Check19, typename Check20, + typename Check21, typename Check22, typename Check23, typename Check24, + typename Check25, typename Check26, typename Check27, typename Check28, + typename Check29, typename Check30, typename Check31, typename Check32, + typename Check33, typename Check34, typename Check35, typename Check36, + typename Check37, typename Check38, typename Check39, typename Check40, + typename Check41, typename Check42, typename Check43, typename Check44, + typename Check45, typename Action0, typename Action1, typename Action2, + typename Action3, typename Action4, typename Action5, typename Action6, + typename Action7, typename Action8, typename Action9, typename Action10, + typename Action11, typename Action12, typename Action13, typename Action14, + typename Action15, typename Action16, typename Action17, typename Action18, + typename Action19, typename Action20, typename Action21, typename Action22, + typename Action23, typename Action24, typename Action25, typename Action26, + typename Action27, typename Action28, typename Action29, typename Action30, + typename Action31, typename Action32, typename Action33, typename Action34, + typename Action35, typename Action36, typename Action37, typename Action38, + typename Action39, typename Action40, typename Action41, typename Action42, + typename Action43, typename Action44, typename Action45> +auto IfList(CheckArg input, ActionArg action_arg, ActionFail action_fail, + Check0 check0, Check1 check1, Check2 check2, Check3 check3, + Check4 check4, Check5 check5, Check6 check6, Check7 check7, + Check8 check8, Check9 check9, Check10 check10, Check11 check11, + Check12 check12, Check13 check13, Check14 check14, Check15 check15, + Check16 check16, Check17 check17, Check18 check18, Check19 check19, + Check20 check20, Check21 check21, Check22 check22, Check23 check23, + Check24 check24, Check25 check25, Check26 check26, Check27 check27, + Check28 check28, Check29 check29, Check30 check30, Check31 check31, + Check32 check32, Check33 check33, Check34 check34, Check35 check35, + Check36 check36, Check37 check37, Check38 check38, Check39 check39, + Check40 check40, Check41 check41, Check42 check42, Check43 check43, + Check44 check44, Check45 check45, Action0 action0, Action1 action1, + Action2 action2, Action3 action3, Action4 action4, Action5 action5, + Action6 action6, Action7 action7, Action8 action8, Action9 action9, + Action10 action10, Action11 action11, Action12 action12, + Action13 action13, Action14 action14, Action15 action15, + Action16 action16, Action17 action17, Action18 action18, + Action19 action19, Action20 action20, Action21 action21, + Action22 action22, Action23 action23, Action24 action24, + Action25 action25, Action26 action26, Action27 action27, + Action28 action28, Action29 action29, Action30 action30, + Action31 action31, Action32 action32, Action33 action33, + Action34 action34, Action35 action35, Action36 action36, + Action37 action37, Action38 action38, Action39 action39, + Action40 action40, Action41 action41, Action42 action42, + Action43 action43, Action44 action44, Action45 action45) { + if (check0(input)) return action0(action_arg); + if (check1(input)) return action1(action_arg); + if (check2(input)) return action2(action_arg); + if (check3(input)) return action3(action_arg); + if (check4(input)) return action4(action_arg); + if (check5(input)) return action5(action_arg); + if (check6(input)) return action6(action_arg); + if (check7(input)) return action7(action_arg); + if (check8(input)) return action8(action_arg); + if (check9(input)) return action9(action_arg); + if (check10(input)) return action10(action_arg); + if (check11(input)) return action11(action_arg); + if (check12(input)) return action12(action_arg); + if (check13(input)) return action13(action_arg); + if (check14(input)) return action14(action_arg); + if (check15(input)) return action15(action_arg); + if (check16(input)) return action16(action_arg); + if (check17(input)) return action17(action_arg); + if (check18(input)) return action18(action_arg); + if (check19(input)) return action19(action_arg); + if (check20(input)) return action20(action_arg); + if (check21(input)) return action21(action_arg); + if (check22(input)) return action22(action_arg); + if (check23(input)) return action23(action_arg); + if (check24(input)) return action24(action_arg); + if (check25(input)) return action25(action_arg); + if (check26(input)) return action26(action_arg); + if (check27(input)) return action27(action_arg); + if (check28(input)) return action28(action_arg); + if (check29(input)) return action29(action_arg); + if (check30(input)) return action30(action_arg); + if (check31(input)) return action31(action_arg); + if (check32(input)) return action32(action_arg); + if (check33(input)) return action33(action_arg); + if (check34(input)) return action34(action_arg); + if (check35(input)) return action35(action_arg); + if (check36(input)) return action36(action_arg); + if (check37(input)) return action37(action_arg); + if (check38(input)) return action38(action_arg); + if (check39(input)) return action39(action_arg); + if (check40(input)) return action40(action_arg); + if (check41(input)) return action41(action_arg); + if (check42(input)) return action42(action_arg); + if (check43(input)) return action43(action_arg); + if (check44(input)) return action44(action_arg); + if (check45(input)) return action45(action_arg); + return action_fail(action_arg); +} + +template < + typename CheckArg, typename ActionArg, typename ActionFail, typename Check0, + typename Check1, typename Check2, typename Check3, typename Check4, + typename Check5, typename Check6, typename Check7, typename Check8, + typename Check9, typename Check10, typename Check11, typename Check12, + typename Check13, typename Check14, typename Check15, typename Check16, + typename Check17, typename Check18, typename Check19, typename Check20, + typename Check21, typename Check22, typename Check23, typename Check24, + typename Check25, typename Check26, typename Check27, typename Check28, + typename Check29, typename Check30, typename Check31, typename Check32, + typename Check33, typename Check34, typename Check35, typename Check36, + typename Check37, typename Check38, typename Check39, typename Check40, + typename Check41, typename Check42, typename Check43, typename Check44, + typename Check45, typename Check46, typename Action0, typename Action1, + typename Action2, typename Action3, typename Action4, typename Action5, + typename Action6, typename Action7, typename Action8, typename Action9, + typename Action10, typename Action11, typename Action12, typename Action13, + typename Action14, typename Action15, typename Action16, typename Action17, + typename Action18, typename Action19, typename Action20, typename Action21, + typename Action22, typename Action23, typename Action24, typename Action25, + typename Action26, typename Action27, typename Action28, typename Action29, + typename Action30, typename Action31, typename Action32, typename Action33, + typename Action34, typename Action35, typename Action36, typename Action37, + typename Action38, typename Action39, typename Action40, typename Action41, + typename Action42, typename Action43, typename Action44, typename Action45, + typename Action46> +auto IfList( + CheckArg input, ActionArg action_arg, ActionFail action_fail, Check0 check0, + Check1 check1, Check2 check2, Check3 check3, Check4 check4, Check5 check5, + Check6 check6, Check7 check7, Check8 check8, Check9 check9, Check10 check10, + Check11 check11, Check12 check12, Check13 check13, Check14 check14, + Check15 check15, Check16 check16, Check17 check17, Check18 check18, + Check19 check19, Check20 check20, Check21 check21, Check22 check22, + Check23 check23, Check24 check24, Check25 check25, Check26 check26, + Check27 check27, Check28 check28, Check29 check29, Check30 check30, + Check31 check31, Check32 check32, Check33 check33, Check34 check34, + Check35 check35, Check36 check36, Check37 check37, Check38 check38, + Check39 check39, Check40 check40, Check41 check41, Check42 check42, + Check43 check43, Check44 check44, Check45 check45, Check46 check46, + Action0 action0, Action1 action1, Action2 action2, Action3 action3, + Action4 action4, Action5 action5, Action6 action6, Action7 action7, + Action8 action8, Action9 action9, Action10 action10, Action11 action11, + Action12 action12, Action13 action13, Action14 action14, Action15 action15, + Action16 action16, Action17 action17, Action18 action18, Action19 action19, + Action20 action20, Action21 action21, Action22 action22, Action23 action23, + Action24 action24, Action25 action25, Action26 action26, Action27 action27, + Action28 action28, Action29 action29, Action30 action30, Action31 action31, + Action32 action32, Action33 action33, Action34 action34, Action35 action35, + Action36 action36, Action37 action37, Action38 action38, Action39 action39, + Action40 action40, Action41 action41, Action42 action42, Action43 action43, + Action44 action44, Action45 action45, Action46 action46) { + if (check0(input)) return action0(action_arg); + if (check1(input)) return action1(action_arg); + if (check2(input)) return action2(action_arg); + if (check3(input)) return action3(action_arg); + if (check4(input)) return action4(action_arg); + if (check5(input)) return action5(action_arg); + if (check6(input)) return action6(action_arg); + if (check7(input)) return action7(action_arg); + if (check8(input)) return action8(action_arg); + if (check9(input)) return action9(action_arg); + if (check10(input)) return action10(action_arg); + if (check11(input)) return action11(action_arg); + if (check12(input)) return action12(action_arg); + if (check13(input)) return action13(action_arg); + if (check14(input)) return action14(action_arg); + if (check15(input)) return action15(action_arg); + if (check16(input)) return action16(action_arg); + if (check17(input)) return action17(action_arg); + if (check18(input)) return action18(action_arg); + if (check19(input)) return action19(action_arg); + if (check20(input)) return action20(action_arg); + if (check21(input)) return action21(action_arg); + if (check22(input)) return action22(action_arg); + if (check23(input)) return action23(action_arg); + if (check24(input)) return action24(action_arg); + if (check25(input)) return action25(action_arg); + if (check26(input)) return action26(action_arg); + if (check27(input)) return action27(action_arg); + if (check28(input)) return action28(action_arg); + if (check29(input)) return action29(action_arg); + if (check30(input)) return action30(action_arg); + if (check31(input)) return action31(action_arg); + if (check32(input)) return action32(action_arg); + if (check33(input)) return action33(action_arg); + if (check34(input)) return action34(action_arg); + if (check35(input)) return action35(action_arg); + if (check36(input)) return action36(action_arg); + if (check37(input)) return action37(action_arg); + if (check38(input)) return action38(action_arg); + if (check39(input)) return action39(action_arg); + if (check40(input)) return action40(action_arg); + if (check41(input)) return action41(action_arg); + if (check42(input)) return action42(action_arg); + if (check43(input)) return action43(action_arg); + if (check44(input)) return action44(action_arg); + if (check45(input)) return action45(action_arg); + if (check46(input)) return action46(action_arg); + return action_fail(action_arg); +} + +template < + typename CheckArg, typename ActionArg, typename ActionFail, typename Check0, + typename Check1, typename Check2, typename Check3, typename Check4, + typename Check5, typename Check6, typename Check7, typename Check8, + typename Check9, typename Check10, typename Check11, typename Check12, + typename Check13, typename Check14, typename Check15, typename Check16, + typename Check17, typename Check18, typename Check19, typename Check20, + typename Check21, typename Check22, typename Check23, typename Check24, + typename Check25, typename Check26, typename Check27, typename Check28, + typename Check29, typename Check30, typename Check31, typename Check32, + typename Check33, typename Check34, typename Check35, typename Check36, + typename Check37, typename Check38, typename Check39, typename Check40, + typename Check41, typename Check42, typename Check43, typename Check44, + typename Check45, typename Check46, typename Check47, typename Action0, + typename Action1, typename Action2, typename Action3, typename Action4, + typename Action5, typename Action6, typename Action7, typename Action8, + typename Action9, typename Action10, typename Action11, typename Action12, + typename Action13, typename Action14, typename Action15, typename Action16, + typename Action17, typename Action18, typename Action19, typename Action20, + typename Action21, typename Action22, typename Action23, typename Action24, + typename Action25, typename Action26, typename Action27, typename Action28, + typename Action29, typename Action30, typename Action31, typename Action32, + typename Action33, typename Action34, typename Action35, typename Action36, + typename Action37, typename Action38, typename Action39, typename Action40, + typename Action41, typename Action42, typename Action43, typename Action44, + typename Action45, typename Action46, typename Action47> +auto IfList( + CheckArg input, ActionArg action_arg, ActionFail action_fail, Check0 check0, + Check1 check1, Check2 check2, Check3 check3, Check4 check4, Check5 check5, + Check6 check6, Check7 check7, Check8 check8, Check9 check9, Check10 check10, + Check11 check11, Check12 check12, Check13 check13, Check14 check14, + Check15 check15, Check16 check16, Check17 check17, Check18 check18, + Check19 check19, Check20 check20, Check21 check21, Check22 check22, + Check23 check23, Check24 check24, Check25 check25, Check26 check26, + Check27 check27, Check28 check28, Check29 check29, Check30 check30, + Check31 check31, Check32 check32, Check33 check33, Check34 check34, + Check35 check35, Check36 check36, Check37 check37, Check38 check38, + Check39 check39, Check40 check40, Check41 check41, Check42 check42, + Check43 check43, Check44 check44, Check45 check45, Check46 check46, + Check47 check47, Action0 action0, Action1 action1, Action2 action2, + Action3 action3, Action4 action4, Action5 action5, Action6 action6, + Action7 action7, Action8 action8, Action9 action9, Action10 action10, + Action11 action11, Action12 action12, Action13 action13, Action14 action14, + Action15 action15, Action16 action16, Action17 action17, Action18 action18, + Action19 action19, Action20 action20, Action21 action21, Action22 action22, + Action23 action23, Action24 action24, Action25 action25, Action26 action26, + Action27 action27, Action28 action28, Action29 action29, Action30 action30, + Action31 action31, Action32 action32, Action33 action33, Action34 action34, + Action35 action35, Action36 action36, Action37 action37, Action38 action38, + Action39 action39, Action40 action40, Action41 action41, Action42 action42, + Action43 action43, Action44 action44, Action45 action45, Action46 action46, + Action47 action47) { + if (check0(input)) return action0(action_arg); + if (check1(input)) return action1(action_arg); + if (check2(input)) return action2(action_arg); + if (check3(input)) return action3(action_arg); + if (check4(input)) return action4(action_arg); + if (check5(input)) return action5(action_arg); + if (check6(input)) return action6(action_arg); + if (check7(input)) return action7(action_arg); + if (check8(input)) return action8(action_arg); + if (check9(input)) return action9(action_arg); + if (check10(input)) return action10(action_arg); + if (check11(input)) return action11(action_arg); + if (check12(input)) return action12(action_arg); + if (check13(input)) return action13(action_arg); + if (check14(input)) return action14(action_arg); + if (check15(input)) return action15(action_arg); + if (check16(input)) return action16(action_arg); + if (check17(input)) return action17(action_arg); + if (check18(input)) return action18(action_arg); + if (check19(input)) return action19(action_arg); + if (check20(input)) return action20(action_arg); + if (check21(input)) return action21(action_arg); + if (check22(input)) return action22(action_arg); + if (check23(input)) return action23(action_arg); + if (check24(input)) return action24(action_arg); + if (check25(input)) return action25(action_arg); + if (check26(input)) return action26(action_arg); + if (check27(input)) return action27(action_arg); + if (check28(input)) return action28(action_arg); + if (check29(input)) return action29(action_arg); + if (check30(input)) return action30(action_arg); + if (check31(input)) return action31(action_arg); + if (check32(input)) return action32(action_arg); + if (check33(input)) return action33(action_arg); + if (check34(input)) return action34(action_arg); + if (check35(input)) return action35(action_arg); + if (check36(input)) return action36(action_arg); + if (check37(input)) return action37(action_arg); + if (check38(input)) return action38(action_arg); + if (check39(input)) return action39(action_arg); + if (check40(input)) return action40(action_arg); + if (check41(input)) return action41(action_arg); + if (check42(input)) return action42(action_arg); + if (check43(input)) return action43(action_arg); + if (check44(input)) return action44(action_arg); + if (check45(input)) return action45(action_arg); + if (check46(input)) return action46(action_arg); + if (check47(input)) return action47(action_arg); + return action_fail(action_arg); +} + +template < + typename CheckArg, typename ActionArg, typename ActionFail, typename Check0, + typename Check1, typename Check2, typename Check3, typename Check4, + typename Check5, typename Check6, typename Check7, typename Check8, + typename Check9, typename Check10, typename Check11, typename Check12, + typename Check13, typename Check14, typename Check15, typename Check16, + typename Check17, typename Check18, typename Check19, typename Check20, + typename Check21, typename Check22, typename Check23, typename Check24, + typename Check25, typename Check26, typename Check27, typename Check28, + typename Check29, typename Check30, typename Check31, typename Check32, + typename Check33, typename Check34, typename Check35, typename Check36, + typename Check37, typename Check38, typename Check39, typename Check40, + typename Check41, typename Check42, typename Check43, typename Check44, + typename Check45, typename Check46, typename Check47, typename Check48, + typename Action0, typename Action1, typename Action2, typename Action3, + typename Action4, typename Action5, typename Action6, typename Action7, + typename Action8, typename Action9, typename Action10, typename Action11, + typename Action12, typename Action13, typename Action14, typename Action15, + typename Action16, typename Action17, typename Action18, typename Action19, + typename Action20, typename Action21, typename Action22, typename Action23, + typename Action24, typename Action25, typename Action26, typename Action27, + typename Action28, typename Action29, typename Action30, typename Action31, + typename Action32, typename Action33, typename Action34, typename Action35, + typename Action36, typename Action37, typename Action38, typename Action39, + typename Action40, typename Action41, typename Action42, typename Action43, + typename Action44, typename Action45, typename Action46, typename Action47, + typename Action48> +auto IfList( + CheckArg input, ActionArg action_arg, ActionFail action_fail, Check0 check0, + Check1 check1, Check2 check2, Check3 check3, Check4 check4, Check5 check5, + Check6 check6, Check7 check7, Check8 check8, Check9 check9, Check10 check10, + Check11 check11, Check12 check12, Check13 check13, Check14 check14, + Check15 check15, Check16 check16, Check17 check17, Check18 check18, + Check19 check19, Check20 check20, Check21 check21, Check22 check22, + Check23 check23, Check24 check24, Check25 check25, Check26 check26, + Check27 check27, Check28 check28, Check29 check29, Check30 check30, + Check31 check31, Check32 check32, Check33 check33, Check34 check34, + Check35 check35, Check36 check36, Check37 check37, Check38 check38, + Check39 check39, Check40 check40, Check41 check41, Check42 check42, + Check43 check43, Check44 check44, Check45 check45, Check46 check46, + Check47 check47, Check48 check48, Action0 action0, Action1 action1, + Action2 action2, Action3 action3, Action4 action4, Action5 action5, + Action6 action6, Action7 action7, Action8 action8, Action9 action9, + Action10 action10, Action11 action11, Action12 action12, Action13 action13, + Action14 action14, Action15 action15, Action16 action16, Action17 action17, + Action18 action18, Action19 action19, Action20 action20, Action21 action21, + Action22 action22, Action23 action23, Action24 action24, Action25 action25, + Action26 action26, Action27 action27, Action28 action28, Action29 action29, + Action30 action30, Action31 action31, Action32 action32, Action33 action33, + Action34 action34, Action35 action35, Action36 action36, Action37 action37, + Action38 action38, Action39 action39, Action40 action40, Action41 action41, + Action42 action42, Action43 action43, Action44 action44, Action45 action45, + Action46 action46, Action47 action47, Action48 action48) { + if (check0(input)) return action0(action_arg); + if (check1(input)) return action1(action_arg); + if (check2(input)) return action2(action_arg); + if (check3(input)) return action3(action_arg); + if (check4(input)) return action4(action_arg); + if (check5(input)) return action5(action_arg); + if (check6(input)) return action6(action_arg); + if (check7(input)) return action7(action_arg); + if (check8(input)) return action8(action_arg); + if (check9(input)) return action9(action_arg); + if (check10(input)) return action10(action_arg); + if (check11(input)) return action11(action_arg); + if (check12(input)) return action12(action_arg); + if (check13(input)) return action13(action_arg); + if (check14(input)) return action14(action_arg); + if (check15(input)) return action15(action_arg); + if (check16(input)) return action16(action_arg); + if (check17(input)) return action17(action_arg); + if (check18(input)) return action18(action_arg); + if (check19(input)) return action19(action_arg); + if (check20(input)) return action20(action_arg); + if (check21(input)) return action21(action_arg); + if (check22(input)) return action22(action_arg); + if (check23(input)) return action23(action_arg); + if (check24(input)) return action24(action_arg); + if (check25(input)) return action25(action_arg); + if (check26(input)) return action26(action_arg); + if (check27(input)) return action27(action_arg); + if (check28(input)) return action28(action_arg); + if (check29(input)) return action29(action_arg); + if (check30(input)) return action30(action_arg); + if (check31(input)) return action31(action_arg); + if (check32(input)) return action32(action_arg); + if (check33(input)) return action33(action_arg); + if (check34(input)) return action34(action_arg); + if (check35(input)) return action35(action_arg); + if (check36(input)) return action36(action_arg); + if (check37(input)) return action37(action_arg); + if (check38(input)) return action38(action_arg); + if (check39(input)) return action39(action_arg); + if (check40(input)) return action40(action_arg); + if (check41(input)) return action41(action_arg); + if (check42(input)) return action42(action_arg); + if (check43(input)) return action43(action_arg); + if (check44(input)) return action44(action_arg); + if (check45(input)) return action45(action_arg); + if (check46(input)) return action46(action_arg); + if (check47(input)) return action47(action_arg); + if (check48(input)) return action48(action_arg); + return action_fail(action_arg); +} + +template < + typename CheckArg, typename ActionArg, typename ActionFail, typename Check0, + typename Check1, typename Check2, typename Check3, typename Check4, + typename Check5, typename Check6, typename Check7, typename Check8, + typename Check9, typename Check10, typename Check11, typename Check12, + typename Check13, typename Check14, typename Check15, typename Check16, + typename Check17, typename Check18, typename Check19, typename Check20, + typename Check21, typename Check22, typename Check23, typename Check24, + typename Check25, typename Check26, typename Check27, typename Check28, + typename Check29, typename Check30, typename Check31, typename Check32, + typename Check33, typename Check34, typename Check35, typename Check36, + typename Check37, typename Check38, typename Check39, typename Check40, + typename Check41, typename Check42, typename Check43, typename Check44, + typename Check45, typename Check46, typename Check47, typename Check48, + typename Check49, typename Action0, typename Action1, typename Action2, + typename Action3, typename Action4, typename Action5, typename Action6, + typename Action7, typename Action8, typename Action9, typename Action10, + typename Action11, typename Action12, typename Action13, typename Action14, + typename Action15, typename Action16, typename Action17, typename Action18, + typename Action19, typename Action20, typename Action21, typename Action22, + typename Action23, typename Action24, typename Action25, typename Action26, + typename Action27, typename Action28, typename Action29, typename Action30, + typename Action31, typename Action32, typename Action33, typename Action34, + typename Action35, typename Action36, typename Action37, typename Action38, + typename Action39, typename Action40, typename Action41, typename Action42, + typename Action43, typename Action44, typename Action45, typename Action46, + typename Action47, typename Action48, typename Action49> +auto IfList( + CheckArg input, ActionArg action_arg, ActionFail action_fail, Check0 check0, + Check1 check1, Check2 check2, Check3 check3, Check4 check4, Check5 check5, + Check6 check6, Check7 check7, Check8 check8, Check9 check9, Check10 check10, + Check11 check11, Check12 check12, Check13 check13, Check14 check14, + Check15 check15, Check16 check16, Check17 check17, Check18 check18, + Check19 check19, Check20 check20, Check21 check21, Check22 check22, + Check23 check23, Check24 check24, Check25 check25, Check26 check26, + Check27 check27, Check28 check28, Check29 check29, Check30 check30, + Check31 check31, Check32 check32, Check33 check33, Check34 check34, + Check35 check35, Check36 check36, Check37 check37, Check38 check38, + Check39 check39, Check40 check40, Check41 check41, Check42 check42, + Check43 check43, Check44 check44, Check45 check45, Check46 check46, + Check47 check47, Check48 check48, Check49 check49, Action0 action0, + Action1 action1, Action2 action2, Action3 action3, Action4 action4, + Action5 action5, Action6 action6, Action7 action7, Action8 action8, + Action9 action9, Action10 action10, Action11 action11, Action12 action12, + Action13 action13, Action14 action14, Action15 action15, Action16 action16, + Action17 action17, Action18 action18, Action19 action19, Action20 action20, + Action21 action21, Action22 action22, Action23 action23, Action24 action24, + Action25 action25, Action26 action26, Action27 action27, Action28 action28, + Action29 action29, Action30 action30, Action31 action31, Action32 action32, + Action33 action33, Action34 action34, Action35 action35, Action36 action36, + Action37 action37, Action38 action38, Action39 action39, Action40 action40, + Action41 action41, Action42 action42, Action43 action43, Action44 action44, + Action45 action45, Action46 action46, Action47 action47, Action48 action48, + Action49 action49) { + if (check0(input)) return action0(action_arg); + if (check1(input)) return action1(action_arg); + if (check2(input)) return action2(action_arg); + if (check3(input)) return action3(action_arg); + if (check4(input)) return action4(action_arg); + if (check5(input)) return action5(action_arg); + if (check6(input)) return action6(action_arg); + if (check7(input)) return action7(action_arg); + if (check8(input)) return action8(action_arg); + if (check9(input)) return action9(action_arg); + if (check10(input)) return action10(action_arg); + if (check11(input)) return action11(action_arg); + if (check12(input)) return action12(action_arg); + if (check13(input)) return action13(action_arg); + if (check14(input)) return action14(action_arg); + if (check15(input)) return action15(action_arg); + if (check16(input)) return action16(action_arg); + if (check17(input)) return action17(action_arg); + if (check18(input)) return action18(action_arg); + if (check19(input)) return action19(action_arg); + if (check20(input)) return action20(action_arg); + if (check21(input)) return action21(action_arg); + if (check22(input)) return action22(action_arg); + if (check23(input)) return action23(action_arg); + if (check24(input)) return action24(action_arg); + if (check25(input)) return action25(action_arg); + if (check26(input)) return action26(action_arg); + if (check27(input)) return action27(action_arg); + if (check28(input)) return action28(action_arg); + if (check29(input)) return action29(action_arg); + if (check30(input)) return action30(action_arg); + if (check31(input)) return action31(action_arg); + if (check32(input)) return action32(action_arg); + if (check33(input)) return action33(action_arg); + if (check34(input)) return action34(action_arg); + if (check35(input)) return action35(action_arg); + if (check36(input)) return action36(action_arg); + if (check37(input)) return action37(action_arg); + if (check38(input)) return action38(action_arg); + if (check39(input)) return action39(action_arg); + if (check40(input)) return action40(action_arg); + if (check41(input)) return action41(action_arg); + if (check42(input)) return action42(action_arg); + if (check43(input)) return action43(action_arg); + if (check44(input)) return action44(action_arg); + if (check45(input)) return action45(action_arg); + if (check46(input)) return action46(action_arg); + if (check47(input)) return action47(action_arg); + if (check48(input)) return action48(action_arg); + if (check49(input)) return action49(action_arg); + return action_fail(action_arg); +} + +template < + typename CheckArg, typename ActionArg, typename ActionFail, typename Check0, + typename Check1, typename Check2, typename Check3, typename Check4, + typename Check5, typename Check6, typename Check7, typename Check8, + typename Check9, typename Check10, typename Check11, typename Check12, + typename Check13, typename Check14, typename Check15, typename Check16, + typename Check17, typename Check18, typename Check19, typename Check20, + typename Check21, typename Check22, typename Check23, typename Check24, + typename Check25, typename Check26, typename Check27, typename Check28, + typename Check29, typename Check30, typename Check31, typename Check32, + typename Check33, typename Check34, typename Check35, typename Check36, + typename Check37, typename Check38, typename Check39, typename Check40, + typename Check41, typename Check42, typename Check43, typename Check44, + typename Check45, typename Check46, typename Check47, typename Check48, + typename Check49, typename Check50, typename Action0, typename Action1, + typename Action2, typename Action3, typename Action4, typename Action5, + typename Action6, typename Action7, typename Action8, typename Action9, + typename Action10, typename Action11, typename Action12, typename Action13, + typename Action14, typename Action15, typename Action16, typename Action17, + typename Action18, typename Action19, typename Action20, typename Action21, + typename Action22, typename Action23, typename Action24, typename Action25, + typename Action26, typename Action27, typename Action28, typename Action29, + typename Action30, typename Action31, typename Action32, typename Action33, + typename Action34, typename Action35, typename Action36, typename Action37, + typename Action38, typename Action39, typename Action40, typename Action41, + typename Action42, typename Action43, typename Action44, typename Action45, + typename Action46, typename Action47, typename Action48, typename Action49, + typename Action50> +auto IfList( + CheckArg input, ActionArg action_arg, ActionFail action_fail, Check0 check0, + Check1 check1, Check2 check2, Check3 check3, Check4 check4, Check5 check5, + Check6 check6, Check7 check7, Check8 check8, Check9 check9, Check10 check10, + Check11 check11, Check12 check12, Check13 check13, Check14 check14, + Check15 check15, Check16 check16, Check17 check17, Check18 check18, + Check19 check19, Check20 check20, Check21 check21, Check22 check22, + Check23 check23, Check24 check24, Check25 check25, Check26 check26, + Check27 check27, Check28 check28, Check29 check29, Check30 check30, + Check31 check31, Check32 check32, Check33 check33, Check34 check34, + Check35 check35, Check36 check36, Check37 check37, Check38 check38, + Check39 check39, Check40 check40, Check41 check41, Check42 check42, + Check43 check43, Check44 check44, Check45 check45, Check46 check46, + Check47 check47, Check48 check48, Check49 check49, Check50 check50, + Action0 action0, Action1 action1, Action2 action2, Action3 action3, + Action4 action4, Action5 action5, Action6 action6, Action7 action7, + Action8 action8, Action9 action9, Action10 action10, Action11 action11, + Action12 action12, Action13 action13, Action14 action14, Action15 action15, + Action16 action16, Action17 action17, Action18 action18, Action19 action19, + Action20 action20, Action21 action21, Action22 action22, Action23 action23, + Action24 action24, Action25 action25, Action26 action26, Action27 action27, + Action28 action28, Action29 action29, Action30 action30, Action31 action31, + Action32 action32, Action33 action33, Action34 action34, Action35 action35, + Action36 action36, Action37 action37, Action38 action38, Action39 action39, + Action40 action40, Action41 action41, Action42 action42, Action43 action43, + Action44 action44, Action45 action45, Action46 action46, Action47 action47, + Action48 action48, Action49 action49, Action50 action50) { + if (check0(input)) return action0(action_arg); + if (check1(input)) return action1(action_arg); + if (check2(input)) return action2(action_arg); + if (check3(input)) return action3(action_arg); + if (check4(input)) return action4(action_arg); + if (check5(input)) return action5(action_arg); + if (check6(input)) return action6(action_arg); + if (check7(input)) return action7(action_arg); + if (check8(input)) return action8(action_arg); + if (check9(input)) return action9(action_arg); + if (check10(input)) return action10(action_arg); + if (check11(input)) return action11(action_arg); + if (check12(input)) return action12(action_arg); + if (check13(input)) return action13(action_arg); + if (check14(input)) return action14(action_arg); + if (check15(input)) return action15(action_arg); + if (check16(input)) return action16(action_arg); + if (check17(input)) return action17(action_arg); + if (check18(input)) return action18(action_arg); + if (check19(input)) return action19(action_arg); + if (check20(input)) return action20(action_arg); + if (check21(input)) return action21(action_arg); + if (check22(input)) return action22(action_arg); + if (check23(input)) return action23(action_arg); + if (check24(input)) return action24(action_arg); + if (check25(input)) return action25(action_arg); + if (check26(input)) return action26(action_arg); + if (check27(input)) return action27(action_arg); + if (check28(input)) return action28(action_arg); + if (check29(input)) return action29(action_arg); + if (check30(input)) return action30(action_arg); + if (check31(input)) return action31(action_arg); + if (check32(input)) return action32(action_arg); + if (check33(input)) return action33(action_arg); + if (check34(input)) return action34(action_arg); + if (check35(input)) return action35(action_arg); + if (check36(input)) return action36(action_arg); + if (check37(input)) return action37(action_arg); + if (check38(input)) return action38(action_arg); + if (check39(input)) return action39(action_arg); + if (check40(input)) return action40(action_arg); + if (check41(input)) return action41(action_arg); + if (check42(input)) return action42(action_arg); + if (check43(input)) return action43(action_arg); + if (check44(input)) return action44(action_arg); + if (check45(input)) return action45(action_arg); + if (check46(input)) return action46(action_arg); + if (check47(input)) return action47(action_arg); + if (check48(input)) return action48(action_arg); + if (check49(input)) return action49(action_arg); + if (check50(input)) return action50(action_arg); + return action_fail(action_arg); +} + +template < + typename CheckArg, typename ActionArg, typename ActionFail, typename Check0, + typename Check1, typename Check2, typename Check3, typename Check4, + typename Check5, typename Check6, typename Check7, typename Check8, + typename Check9, typename Check10, typename Check11, typename Check12, + typename Check13, typename Check14, typename Check15, typename Check16, + typename Check17, typename Check18, typename Check19, typename Check20, + typename Check21, typename Check22, typename Check23, typename Check24, + typename Check25, typename Check26, typename Check27, typename Check28, + typename Check29, typename Check30, typename Check31, typename Check32, + typename Check33, typename Check34, typename Check35, typename Check36, + typename Check37, typename Check38, typename Check39, typename Check40, + typename Check41, typename Check42, typename Check43, typename Check44, + typename Check45, typename Check46, typename Check47, typename Check48, + typename Check49, typename Check50, typename Check51, typename Action0, + typename Action1, typename Action2, typename Action3, typename Action4, + typename Action5, typename Action6, typename Action7, typename Action8, + typename Action9, typename Action10, typename Action11, typename Action12, + typename Action13, typename Action14, typename Action15, typename Action16, + typename Action17, typename Action18, typename Action19, typename Action20, + typename Action21, typename Action22, typename Action23, typename Action24, + typename Action25, typename Action26, typename Action27, typename Action28, + typename Action29, typename Action30, typename Action31, typename Action32, + typename Action33, typename Action34, typename Action35, typename Action36, + typename Action37, typename Action38, typename Action39, typename Action40, + typename Action41, typename Action42, typename Action43, typename Action44, + typename Action45, typename Action46, typename Action47, typename Action48, + typename Action49, typename Action50, typename Action51> +auto IfList( + CheckArg input, ActionArg action_arg, ActionFail action_fail, Check0 check0, + Check1 check1, Check2 check2, Check3 check3, Check4 check4, Check5 check5, + Check6 check6, Check7 check7, Check8 check8, Check9 check9, Check10 check10, + Check11 check11, Check12 check12, Check13 check13, Check14 check14, + Check15 check15, Check16 check16, Check17 check17, Check18 check18, + Check19 check19, Check20 check20, Check21 check21, Check22 check22, + Check23 check23, Check24 check24, Check25 check25, Check26 check26, + Check27 check27, Check28 check28, Check29 check29, Check30 check30, + Check31 check31, Check32 check32, Check33 check33, Check34 check34, + Check35 check35, Check36 check36, Check37 check37, Check38 check38, + Check39 check39, Check40 check40, Check41 check41, Check42 check42, + Check43 check43, Check44 check44, Check45 check45, Check46 check46, + Check47 check47, Check48 check48, Check49 check49, Check50 check50, + Check51 check51, Action0 action0, Action1 action1, Action2 action2, + Action3 action3, Action4 action4, Action5 action5, Action6 action6, + Action7 action7, Action8 action8, Action9 action9, Action10 action10, + Action11 action11, Action12 action12, Action13 action13, Action14 action14, + Action15 action15, Action16 action16, Action17 action17, Action18 action18, + Action19 action19, Action20 action20, Action21 action21, Action22 action22, + Action23 action23, Action24 action24, Action25 action25, Action26 action26, + Action27 action27, Action28 action28, Action29 action29, Action30 action30, + Action31 action31, Action32 action32, Action33 action33, Action34 action34, + Action35 action35, Action36 action36, Action37 action37, Action38 action38, + Action39 action39, Action40 action40, Action41 action41, Action42 action42, + Action43 action43, Action44 action44, Action45 action45, Action46 action46, + Action47 action47, Action48 action48, Action49 action49, Action50 action50, + Action51 action51) { + if (check0(input)) return action0(action_arg); + if (check1(input)) return action1(action_arg); + if (check2(input)) return action2(action_arg); + if (check3(input)) return action3(action_arg); + if (check4(input)) return action4(action_arg); + if (check5(input)) return action5(action_arg); + if (check6(input)) return action6(action_arg); + if (check7(input)) return action7(action_arg); + if (check8(input)) return action8(action_arg); + if (check9(input)) return action9(action_arg); + if (check10(input)) return action10(action_arg); + if (check11(input)) return action11(action_arg); + if (check12(input)) return action12(action_arg); + if (check13(input)) return action13(action_arg); + if (check14(input)) return action14(action_arg); + if (check15(input)) return action15(action_arg); + if (check16(input)) return action16(action_arg); + if (check17(input)) return action17(action_arg); + if (check18(input)) return action18(action_arg); + if (check19(input)) return action19(action_arg); + if (check20(input)) return action20(action_arg); + if (check21(input)) return action21(action_arg); + if (check22(input)) return action22(action_arg); + if (check23(input)) return action23(action_arg); + if (check24(input)) return action24(action_arg); + if (check25(input)) return action25(action_arg); + if (check26(input)) return action26(action_arg); + if (check27(input)) return action27(action_arg); + if (check28(input)) return action28(action_arg); + if (check29(input)) return action29(action_arg); + if (check30(input)) return action30(action_arg); + if (check31(input)) return action31(action_arg); + if (check32(input)) return action32(action_arg); + if (check33(input)) return action33(action_arg); + if (check34(input)) return action34(action_arg); + if (check35(input)) return action35(action_arg); + if (check36(input)) return action36(action_arg); + if (check37(input)) return action37(action_arg); + if (check38(input)) return action38(action_arg); + if (check39(input)) return action39(action_arg); + if (check40(input)) return action40(action_arg); + if (check41(input)) return action41(action_arg); + if (check42(input)) return action42(action_arg); + if (check43(input)) return action43(action_arg); + if (check44(input)) return action44(action_arg); + if (check45(input)) return action45(action_arg); + if (check46(input)) return action46(action_arg); + if (check47(input)) return action47(action_arg); + if (check48(input)) return action48(action_arg); + if (check49(input)) return action49(action_arg); + if (check50(input)) return action50(action_arg); + if (check51(input)) return action51(action_arg); + return action_fail(action_arg); +} + +template < + typename CheckArg, typename ActionArg, typename ActionFail, typename Check0, + typename Check1, typename Check2, typename Check3, typename Check4, + typename Check5, typename Check6, typename Check7, typename Check8, + typename Check9, typename Check10, typename Check11, typename Check12, + typename Check13, typename Check14, typename Check15, typename Check16, + typename Check17, typename Check18, typename Check19, typename Check20, + typename Check21, typename Check22, typename Check23, typename Check24, + typename Check25, typename Check26, typename Check27, typename Check28, + typename Check29, typename Check30, typename Check31, typename Check32, + typename Check33, typename Check34, typename Check35, typename Check36, + typename Check37, typename Check38, typename Check39, typename Check40, + typename Check41, typename Check42, typename Check43, typename Check44, + typename Check45, typename Check46, typename Check47, typename Check48, + typename Check49, typename Check50, typename Check51, typename Check52, + typename Action0, typename Action1, typename Action2, typename Action3, + typename Action4, typename Action5, typename Action6, typename Action7, + typename Action8, typename Action9, typename Action10, typename Action11, + typename Action12, typename Action13, typename Action14, typename Action15, + typename Action16, typename Action17, typename Action18, typename Action19, + typename Action20, typename Action21, typename Action22, typename Action23, + typename Action24, typename Action25, typename Action26, typename Action27, + typename Action28, typename Action29, typename Action30, typename Action31, + typename Action32, typename Action33, typename Action34, typename Action35, + typename Action36, typename Action37, typename Action38, typename Action39, + typename Action40, typename Action41, typename Action42, typename Action43, + typename Action44, typename Action45, typename Action46, typename Action47, + typename Action48, typename Action49, typename Action50, typename Action51, + typename Action52> +auto IfList( + CheckArg input, ActionArg action_arg, ActionFail action_fail, Check0 check0, + Check1 check1, Check2 check2, Check3 check3, Check4 check4, Check5 check5, + Check6 check6, Check7 check7, Check8 check8, Check9 check9, Check10 check10, + Check11 check11, Check12 check12, Check13 check13, Check14 check14, + Check15 check15, Check16 check16, Check17 check17, Check18 check18, + Check19 check19, Check20 check20, Check21 check21, Check22 check22, + Check23 check23, Check24 check24, Check25 check25, Check26 check26, + Check27 check27, Check28 check28, Check29 check29, Check30 check30, + Check31 check31, Check32 check32, Check33 check33, Check34 check34, + Check35 check35, Check36 check36, Check37 check37, Check38 check38, + Check39 check39, Check40 check40, Check41 check41, Check42 check42, + Check43 check43, Check44 check44, Check45 check45, Check46 check46, + Check47 check47, Check48 check48, Check49 check49, Check50 check50, + Check51 check51, Check52 check52, Action0 action0, Action1 action1, + Action2 action2, Action3 action3, Action4 action4, Action5 action5, + Action6 action6, Action7 action7, Action8 action8, Action9 action9, + Action10 action10, Action11 action11, Action12 action12, Action13 action13, + Action14 action14, Action15 action15, Action16 action16, Action17 action17, + Action18 action18, Action19 action19, Action20 action20, Action21 action21, + Action22 action22, Action23 action23, Action24 action24, Action25 action25, + Action26 action26, Action27 action27, Action28 action28, Action29 action29, + Action30 action30, Action31 action31, Action32 action32, Action33 action33, + Action34 action34, Action35 action35, Action36 action36, Action37 action37, + Action38 action38, Action39 action39, Action40 action40, Action41 action41, + Action42 action42, Action43 action43, Action44 action44, Action45 action45, + Action46 action46, Action47 action47, Action48 action48, Action49 action49, + Action50 action50, Action51 action51, Action52 action52) { + if (check0(input)) return action0(action_arg); + if (check1(input)) return action1(action_arg); + if (check2(input)) return action2(action_arg); + if (check3(input)) return action3(action_arg); + if (check4(input)) return action4(action_arg); + if (check5(input)) return action5(action_arg); + if (check6(input)) return action6(action_arg); + if (check7(input)) return action7(action_arg); + if (check8(input)) return action8(action_arg); + if (check9(input)) return action9(action_arg); + if (check10(input)) return action10(action_arg); + if (check11(input)) return action11(action_arg); + if (check12(input)) return action12(action_arg); + if (check13(input)) return action13(action_arg); + if (check14(input)) return action14(action_arg); + if (check15(input)) return action15(action_arg); + if (check16(input)) return action16(action_arg); + if (check17(input)) return action17(action_arg); + if (check18(input)) return action18(action_arg); + if (check19(input)) return action19(action_arg); + if (check20(input)) return action20(action_arg); + if (check21(input)) return action21(action_arg); + if (check22(input)) return action22(action_arg); + if (check23(input)) return action23(action_arg); + if (check24(input)) return action24(action_arg); + if (check25(input)) return action25(action_arg); + if (check26(input)) return action26(action_arg); + if (check27(input)) return action27(action_arg); + if (check28(input)) return action28(action_arg); + if (check29(input)) return action29(action_arg); + if (check30(input)) return action30(action_arg); + if (check31(input)) return action31(action_arg); + if (check32(input)) return action32(action_arg); + if (check33(input)) return action33(action_arg); + if (check34(input)) return action34(action_arg); + if (check35(input)) return action35(action_arg); + if (check36(input)) return action36(action_arg); + if (check37(input)) return action37(action_arg); + if (check38(input)) return action38(action_arg); + if (check39(input)) return action39(action_arg); + if (check40(input)) return action40(action_arg); + if (check41(input)) return action41(action_arg); + if (check42(input)) return action42(action_arg); + if (check43(input)) return action43(action_arg); + if (check44(input)) return action44(action_arg); + if (check45(input)) return action45(action_arg); + if (check46(input)) return action46(action_arg); + if (check47(input)) return action47(action_arg); + if (check48(input)) return action48(action_arg); + if (check49(input)) return action49(action_arg); + if (check50(input)) return action50(action_arg); + if (check51(input)) return action51(action_arg); + if (check52(input)) return action52(action_arg); + return action_fail(action_arg); +} + +template < + typename CheckArg, typename ActionArg, typename ActionFail, typename Check0, + typename Check1, typename Check2, typename Check3, typename Check4, + typename Check5, typename Check6, typename Check7, typename Check8, + typename Check9, typename Check10, typename Check11, typename Check12, + typename Check13, typename Check14, typename Check15, typename Check16, + typename Check17, typename Check18, typename Check19, typename Check20, + typename Check21, typename Check22, typename Check23, typename Check24, + typename Check25, typename Check26, typename Check27, typename Check28, + typename Check29, typename Check30, typename Check31, typename Check32, + typename Check33, typename Check34, typename Check35, typename Check36, + typename Check37, typename Check38, typename Check39, typename Check40, + typename Check41, typename Check42, typename Check43, typename Check44, + typename Check45, typename Check46, typename Check47, typename Check48, + typename Check49, typename Check50, typename Check51, typename Check52, + typename Check53, typename Action0, typename Action1, typename Action2, + typename Action3, typename Action4, typename Action5, typename Action6, + typename Action7, typename Action8, typename Action9, typename Action10, + typename Action11, typename Action12, typename Action13, typename Action14, + typename Action15, typename Action16, typename Action17, typename Action18, + typename Action19, typename Action20, typename Action21, typename Action22, + typename Action23, typename Action24, typename Action25, typename Action26, + typename Action27, typename Action28, typename Action29, typename Action30, + typename Action31, typename Action32, typename Action33, typename Action34, + typename Action35, typename Action36, typename Action37, typename Action38, + typename Action39, typename Action40, typename Action41, typename Action42, + typename Action43, typename Action44, typename Action45, typename Action46, + typename Action47, typename Action48, typename Action49, typename Action50, + typename Action51, typename Action52, typename Action53> +auto IfList( + CheckArg input, ActionArg action_arg, ActionFail action_fail, Check0 check0, + Check1 check1, Check2 check2, Check3 check3, Check4 check4, Check5 check5, + Check6 check6, Check7 check7, Check8 check8, Check9 check9, Check10 check10, + Check11 check11, Check12 check12, Check13 check13, Check14 check14, + Check15 check15, Check16 check16, Check17 check17, Check18 check18, + Check19 check19, Check20 check20, Check21 check21, Check22 check22, + Check23 check23, Check24 check24, Check25 check25, Check26 check26, + Check27 check27, Check28 check28, Check29 check29, Check30 check30, + Check31 check31, Check32 check32, Check33 check33, Check34 check34, + Check35 check35, Check36 check36, Check37 check37, Check38 check38, + Check39 check39, Check40 check40, Check41 check41, Check42 check42, + Check43 check43, Check44 check44, Check45 check45, Check46 check46, + Check47 check47, Check48 check48, Check49 check49, Check50 check50, + Check51 check51, Check52 check52, Check53 check53, Action0 action0, + Action1 action1, Action2 action2, Action3 action3, Action4 action4, + Action5 action5, Action6 action6, Action7 action7, Action8 action8, + Action9 action9, Action10 action10, Action11 action11, Action12 action12, + Action13 action13, Action14 action14, Action15 action15, Action16 action16, + Action17 action17, Action18 action18, Action19 action19, Action20 action20, + Action21 action21, Action22 action22, Action23 action23, Action24 action24, + Action25 action25, Action26 action26, Action27 action27, Action28 action28, + Action29 action29, Action30 action30, Action31 action31, Action32 action32, + Action33 action33, Action34 action34, Action35 action35, Action36 action36, + Action37 action37, Action38 action38, Action39 action39, Action40 action40, + Action41 action41, Action42 action42, Action43 action43, Action44 action44, + Action45 action45, Action46 action46, Action47 action47, Action48 action48, + Action49 action49, Action50 action50, Action51 action51, Action52 action52, + Action53 action53) { + if (check0(input)) return action0(action_arg); + if (check1(input)) return action1(action_arg); + if (check2(input)) return action2(action_arg); + if (check3(input)) return action3(action_arg); + if (check4(input)) return action4(action_arg); + if (check5(input)) return action5(action_arg); + if (check6(input)) return action6(action_arg); + if (check7(input)) return action7(action_arg); + if (check8(input)) return action8(action_arg); + if (check9(input)) return action9(action_arg); + if (check10(input)) return action10(action_arg); + if (check11(input)) return action11(action_arg); + if (check12(input)) return action12(action_arg); + if (check13(input)) return action13(action_arg); + if (check14(input)) return action14(action_arg); + if (check15(input)) return action15(action_arg); + if (check16(input)) return action16(action_arg); + if (check17(input)) return action17(action_arg); + if (check18(input)) return action18(action_arg); + if (check19(input)) return action19(action_arg); + if (check20(input)) return action20(action_arg); + if (check21(input)) return action21(action_arg); + if (check22(input)) return action22(action_arg); + if (check23(input)) return action23(action_arg); + if (check24(input)) return action24(action_arg); + if (check25(input)) return action25(action_arg); + if (check26(input)) return action26(action_arg); + if (check27(input)) return action27(action_arg); + if (check28(input)) return action28(action_arg); + if (check29(input)) return action29(action_arg); + if (check30(input)) return action30(action_arg); + if (check31(input)) return action31(action_arg); + if (check32(input)) return action32(action_arg); + if (check33(input)) return action33(action_arg); + if (check34(input)) return action34(action_arg); + if (check35(input)) return action35(action_arg); + if (check36(input)) return action36(action_arg); + if (check37(input)) return action37(action_arg); + if (check38(input)) return action38(action_arg); + if (check39(input)) return action39(action_arg); + if (check40(input)) return action40(action_arg); + if (check41(input)) return action41(action_arg); + if (check42(input)) return action42(action_arg); + if (check43(input)) return action43(action_arg); + if (check44(input)) return action44(action_arg); + if (check45(input)) return action45(action_arg); + if (check46(input)) return action46(action_arg); + if (check47(input)) return action47(action_arg); + if (check48(input)) return action48(action_arg); + if (check49(input)) return action49(action_arg); + if (check50(input)) return action50(action_arg); + if (check51(input)) return action51(action_arg); + if (check52(input)) return action52(action_arg); + if (check53(input)) return action53(action_arg); + return action_fail(action_arg); +} + +template < + typename CheckArg, typename ActionArg, typename ActionFail, typename Check0, + typename Check1, typename Check2, typename Check3, typename Check4, + typename Check5, typename Check6, typename Check7, typename Check8, + typename Check9, typename Check10, typename Check11, typename Check12, + typename Check13, typename Check14, typename Check15, typename Check16, + typename Check17, typename Check18, typename Check19, typename Check20, + typename Check21, typename Check22, typename Check23, typename Check24, + typename Check25, typename Check26, typename Check27, typename Check28, + typename Check29, typename Check30, typename Check31, typename Check32, + typename Check33, typename Check34, typename Check35, typename Check36, + typename Check37, typename Check38, typename Check39, typename Check40, + typename Check41, typename Check42, typename Check43, typename Check44, + typename Check45, typename Check46, typename Check47, typename Check48, + typename Check49, typename Check50, typename Check51, typename Check52, + typename Check53, typename Check54, typename Action0, typename Action1, + typename Action2, typename Action3, typename Action4, typename Action5, + typename Action6, typename Action7, typename Action8, typename Action9, + typename Action10, typename Action11, typename Action12, typename Action13, + typename Action14, typename Action15, typename Action16, typename Action17, + typename Action18, typename Action19, typename Action20, typename Action21, + typename Action22, typename Action23, typename Action24, typename Action25, + typename Action26, typename Action27, typename Action28, typename Action29, + typename Action30, typename Action31, typename Action32, typename Action33, + typename Action34, typename Action35, typename Action36, typename Action37, + typename Action38, typename Action39, typename Action40, typename Action41, + typename Action42, typename Action43, typename Action44, typename Action45, + typename Action46, typename Action47, typename Action48, typename Action49, + typename Action50, typename Action51, typename Action52, typename Action53, + typename Action54> +auto IfList( + CheckArg input, ActionArg action_arg, ActionFail action_fail, Check0 check0, + Check1 check1, Check2 check2, Check3 check3, Check4 check4, Check5 check5, + Check6 check6, Check7 check7, Check8 check8, Check9 check9, Check10 check10, + Check11 check11, Check12 check12, Check13 check13, Check14 check14, + Check15 check15, Check16 check16, Check17 check17, Check18 check18, + Check19 check19, Check20 check20, Check21 check21, Check22 check22, + Check23 check23, Check24 check24, Check25 check25, Check26 check26, + Check27 check27, Check28 check28, Check29 check29, Check30 check30, + Check31 check31, Check32 check32, Check33 check33, Check34 check34, + Check35 check35, Check36 check36, Check37 check37, Check38 check38, + Check39 check39, Check40 check40, Check41 check41, Check42 check42, + Check43 check43, Check44 check44, Check45 check45, Check46 check46, + Check47 check47, Check48 check48, Check49 check49, Check50 check50, + Check51 check51, Check52 check52, Check53 check53, Check54 check54, + Action0 action0, Action1 action1, Action2 action2, Action3 action3, + Action4 action4, Action5 action5, Action6 action6, Action7 action7, + Action8 action8, Action9 action9, Action10 action10, Action11 action11, + Action12 action12, Action13 action13, Action14 action14, Action15 action15, + Action16 action16, Action17 action17, Action18 action18, Action19 action19, + Action20 action20, Action21 action21, Action22 action22, Action23 action23, + Action24 action24, Action25 action25, Action26 action26, Action27 action27, + Action28 action28, Action29 action29, Action30 action30, Action31 action31, + Action32 action32, Action33 action33, Action34 action34, Action35 action35, + Action36 action36, Action37 action37, Action38 action38, Action39 action39, + Action40 action40, Action41 action41, Action42 action42, Action43 action43, + Action44 action44, Action45 action45, Action46 action46, Action47 action47, + Action48 action48, Action49 action49, Action50 action50, Action51 action51, + Action52 action52, Action53 action53, Action54 action54) { + if (check0(input)) return action0(action_arg); + if (check1(input)) return action1(action_arg); + if (check2(input)) return action2(action_arg); + if (check3(input)) return action3(action_arg); + if (check4(input)) return action4(action_arg); + if (check5(input)) return action5(action_arg); + if (check6(input)) return action6(action_arg); + if (check7(input)) return action7(action_arg); + if (check8(input)) return action8(action_arg); + if (check9(input)) return action9(action_arg); + if (check10(input)) return action10(action_arg); + if (check11(input)) return action11(action_arg); + if (check12(input)) return action12(action_arg); + if (check13(input)) return action13(action_arg); + if (check14(input)) return action14(action_arg); + if (check15(input)) return action15(action_arg); + if (check16(input)) return action16(action_arg); + if (check17(input)) return action17(action_arg); + if (check18(input)) return action18(action_arg); + if (check19(input)) return action19(action_arg); + if (check20(input)) return action20(action_arg); + if (check21(input)) return action21(action_arg); + if (check22(input)) return action22(action_arg); + if (check23(input)) return action23(action_arg); + if (check24(input)) return action24(action_arg); + if (check25(input)) return action25(action_arg); + if (check26(input)) return action26(action_arg); + if (check27(input)) return action27(action_arg); + if (check28(input)) return action28(action_arg); + if (check29(input)) return action29(action_arg); + if (check30(input)) return action30(action_arg); + if (check31(input)) return action31(action_arg); + if (check32(input)) return action32(action_arg); + if (check33(input)) return action33(action_arg); + if (check34(input)) return action34(action_arg); + if (check35(input)) return action35(action_arg); + if (check36(input)) return action36(action_arg); + if (check37(input)) return action37(action_arg); + if (check38(input)) return action38(action_arg); + if (check39(input)) return action39(action_arg); + if (check40(input)) return action40(action_arg); + if (check41(input)) return action41(action_arg); + if (check42(input)) return action42(action_arg); + if (check43(input)) return action43(action_arg); + if (check44(input)) return action44(action_arg); + if (check45(input)) return action45(action_arg); + if (check46(input)) return action46(action_arg); + if (check47(input)) return action47(action_arg); + if (check48(input)) return action48(action_arg); + if (check49(input)) return action49(action_arg); + if (check50(input)) return action50(action_arg); + if (check51(input)) return action51(action_arg); + if (check52(input)) return action52(action_arg); + if (check53(input)) return action53(action_arg); + if (check54(input)) return action54(action_arg); + return action_fail(action_arg); +} + +template < + typename CheckArg, typename ActionArg, typename ActionFail, typename Check0, + typename Check1, typename Check2, typename Check3, typename Check4, + typename Check5, typename Check6, typename Check7, typename Check8, + typename Check9, typename Check10, typename Check11, typename Check12, + typename Check13, typename Check14, typename Check15, typename Check16, + typename Check17, typename Check18, typename Check19, typename Check20, + typename Check21, typename Check22, typename Check23, typename Check24, + typename Check25, typename Check26, typename Check27, typename Check28, + typename Check29, typename Check30, typename Check31, typename Check32, + typename Check33, typename Check34, typename Check35, typename Check36, + typename Check37, typename Check38, typename Check39, typename Check40, + typename Check41, typename Check42, typename Check43, typename Check44, + typename Check45, typename Check46, typename Check47, typename Check48, + typename Check49, typename Check50, typename Check51, typename Check52, + typename Check53, typename Check54, typename Check55, typename Action0, + typename Action1, typename Action2, typename Action3, typename Action4, + typename Action5, typename Action6, typename Action7, typename Action8, + typename Action9, typename Action10, typename Action11, typename Action12, + typename Action13, typename Action14, typename Action15, typename Action16, + typename Action17, typename Action18, typename Action19, typename Action20, + typename Action21, typename Action22, typename Action23, typename Action24, + typename Action25, typename Action26, typename Action27, typename Action28, + typename Action29, typename Action30, typename Action31, typename Action32, + typename Action33, typename Action34, typename Action35, typename Action36, + typename Action37, typename Action38, typename Action39, typename Action40, + typename Action41, typename Action42, typename Action43, typename Action44, + typename Action45, typename Action46, typename Action47, typename Action48, + typename Action49, typename Action50, typename Action51, typename Action52, + typename Action53, typename Action54, typename Action55> +auto IfList( + CheckArg input, ActionArg action_arg, ActionFail action_fail, Check0 check0, + Check1 check1, Check2 check2, Check3 check3, Check4 check4, Check5 check5, + Check6 check6, Check7 check7, Check8 check8, Check9 check9, Check10 check10, + Check11 check11, Check12 check12, Check13 check13, Check14 check14, + Check15 check15, Check16 check16, Check17 check17, Check18 check18, + Check19 check19, Check20 check20, Check21 check21, Check22 check22, + Check23 check23, Check24 check24, Check25 check25, Check26 check26, + Check27 check27, Check28 check28, Check29 check29, Check30 check30, + Check31 check31, Check32 check32, Check33 check33, Check34 check34, + Check35 check35, Check36 check36, Check37 check37, Check38 check38, + Check39 check39, Check40 check40, Check41 check41, Check42 check42, + Check43 check43, Check44 check44, Check45 check45, Check46 check46, + Check47 check47, Check48 check48, Check49 check49, Check50 check50, + Check51 check51, Check52 check52, Check53 check53, Check54 check54, + Check55 check55, Action0 action0, Action1 action1, Action2 action2, + Action3 action3, Action4 action4, Action5 action5, Action6 action6, + Action7 action7, Action8 action8, Action9 action9, Action10 action10, + Action11 action11, Action12 action12, Action13 action13, Action14 action14, + Action15 action15, Action16 action16, Action17 action17, Action18 action18, + Action19 action19, Action20 action20, Action21 action21, Action22 action22, + Action23 action23, Action24 action24, Action25 action25, Action26 action26, + Action27 action27, Action28 action28, Action29 action29, Action30 action30, + Action31 action31, Action32 action32, Action33 action33, Action34 action34, + Action35 action35, Action36 action36, Action37 action37, Action38 action38, + Action39 action39, Action40 action40, Action41 action41, Action42 action42, + Action43 action43, Action44 action44, Action45 action45, Action46 action46, + Action47 action47, Action48 action48, Action49 action49, Action50 action50, + Action51 action51, Action52 action52, Action53 action53, Action54 action54, + Action55 action55) { + if (check0(input)) return action0(action_arg); + if (check1(input)) return action1(action_arg); + if (check2(input)) return action2(action_arg); + if (check3(input)) return action3(action_arg); + if (check4(input)) return action4(action_arg); + if (check5(input)) return action5(action_arg); + if (check6(input)) return action6(action_arg); + if (check7(input)) return action7(action_arg); + if (check8(input)) return action8(action_arg); + if (check9(input)) return action9(action_arg); + if (check10(input)) return action10(action_arg); + if (check11(input)) return action11(action_arg); + if (check12(input)) return action12(action_arg); + if (check13(input)) return action13(action_arg); + if (check14(input)) return action14(action_arg); + if (check15(input)) return action15(action_arg); + if (check16(input)) return action16(action_arg); + if (check17(input)) return action17(action_arg); + if (check18(input)) return action18(action_arg); + if (check19(input)) return action19(action_arg); + if (check20(input)) return action20(action_arg); + if (check21(input)) return action21(action_arg); + if (check22(input)) return action22(action_arg); + if (check23(input)) return action23(action_arg); + if (check24(input)) return action24(action_arg); + if (check25(input)) return action25(action_arg); + if (check26(input)) return action26(action_arg); + if (check27(input)) return action27(action_arg); + if (check28(input)) return action28(action_arg); + if (check29(input)) return action29(action_arg); + if (check30(input)) return action30(action_arg); + if (check31(input)) return action31(action_arg); + if (check32(input)) return action32(action_arg); + if (check33(input)) return action33(action_arg); + if (check34(input)) return action34(action_arg); + if (check35(input)) return action35(action_arg); + if (check36(input)) return action36(action_arg); + if (check37(input)) return action37(action_arg); + if (check38(input)) return action38(action_arg); + if (check39(input)) return action39(action_arg); + if (check40(input)) return action40(action_arg); + if (check41(input)) return action41(action_arg); + if (check42(input)) return action42(action_arg); + if (check43(input)) return action43(action_arg); + if (check44(input)) return action44(action_arg); + if (check45(input)) return action45(action_arg); + if (check46(input)) return action46(action_arg); + if (check47(input)) return action47(action_arg); + if (check48(input)) return action48(action_arg); + if (check49(input)) return action49(action_arg); + if (check50(input)) return action50(action_arg); + if (check51(input)) return action51(action_arg); + if (check52(input)) return action52(action_arg); + if (check53(input)) return action53(action_arg); + if (check54(input)) return action54(action_arg); + if (check55(input)) return action55(action_arg); + return action_fail(action_arg); +} + +template < + typename CheckArg, typename ActionArg, typename ActionFail, typename Check0, + typename Check1, typename Check2, typename Check3, typename Check4, + typename Check5, typename Check6, typename Check7, typename Check8, + typename Check9, typename Check10, typename Check11, typename Check12, + typename Check13, typename Check14, typename Check15, typename Check16, + typename Check17, typename Check18, typename Check19, typename Check20, + typename Check21, typename Check22, typename Check23, typename Check24, + typename Check25, typename Check26, typename Check27, typename Check28, + typename Check29, typename Check30, typename Check31, typename Check32, + typename Check33, typename Check34, typename Check35, typename Check36, + typename Check37, typename Check38, typename Check39, typename Check40, + typename Check41, typename Check42, typename Check43, typename Check44, + typename Check45, typename Check46, typename Check47, typename Check48, + typename Check49, typename Check50, typename Check51, typename Check52, + typename Check53, typename Check54, typename Check55, typename Check56, + typename Action0, typename Action1, typename Action2, typename Action3, + typename Action4, typename Action5, typename Action6, typename Action7, + typename Action8, typename Action9, typename Action10, typename Action11, + typename Action12, typename Action13, typename Action14, typename Action15, + typename Action16, typename Action17, typename Action18, typename Action19, + typename Action20, typename Action21, typename Action22, typename Action23, + typename Action24, typename Action25, typename Action26, typename Action27, + typename Action28, typename Action29, typename Action30, typename Action31, + typename Action32, typename Action33, typename Action34, typename Action35, + typename Action36, typename Action37, typename Action38, typename Action39, + typename Action40, typename Action41, typename Action42, typename Action43, + typename Action44, typename Action45, typename Action46, typename Action47, + typename Action48, typename Action49, typename Action50, typename Action51, + typename Action52, typename Action53, typename Action54, typename Action55, + typename Action56> +auto IfList( + CheckArg input, ActionArg action_arg, ActionFail action_fail, Check0 check0, + Check1 check1, Check2 check2, Check3 check3, Check4 check4, Check5 check5, + Check6 check6, Check7 check7, Check8 check8, Check9 check9, Check10 check10, + Check11 check11, Check12 check12, Check13 check13, Check14 check14, + Check15 check15, Check16 check16, Check17 check17, Check18 check18, + Check19 check19, Check20 check20, Check21 check21, Check22 check22, + Check23 check23, Check24 check24, Check25 check25, Check26 check26, + Check27 check27, Check28 check28, Check29 check29, Check30 check30, + Check31 check31, Check32 check32, Check33 check33, Check34 check34, + Check35 check35, Check36 check36, Check37 check37, Check38 check38, + Check39 check39, Check40 check40, Check41 check41, Check42 check42, + Check43 check43, Check44 check44, Check45 check45, Check46 check46, + Check47 check47, Check48 check48, Check49 check49, Check50 check50, + Check51 check51, Check52 check52, Check53 check53, Check54 check54, + Check55 check55, Check56 check56, Action0 action0, Action1 action1, + Action2 action2, Action3 action3, Action4 action4, Action5 action5, + Action6 action6, Action7 action7, Action8 action8, Action9 action9, + Action10 action10, Action11 action11, Action12 action12, Action13 action13, + Action14 action14, Action15 action15, Action16 action16, Action17 action17, + Action18 action18, Action19 action19, Action20 action20, Action21 action21, + Action22 action22, Action23 action23, Action24 action24, Action25 action25, + Action26 action26, Action27 action27, Action28 action28, Action29 action29, + Action30 action30, Action31 action31, Action32 action32, Action33 action33, + Action34 action34, Action35 action35, Action36 action36, Action37 action37, + Action38 action38, Action39 action39, Action40 action40, Action41 action41, + Action42 action42, Action43 action43, Action44 action44, Action45 action45, + Action46 action46, Action47 action47, Action48 action48, Action49 action49, + Action50 action50, Action51 action51, Action52 action52, Action53 action53, + Action54 action54, Action55 action55, Action56 action56) { + if (check0(input)) return action0(action_arg); + if (check1(input)) return action1(action_arg); + if (check2(input)) return action2(action_arg); + if (check3(input)) return action3(action_arg); + if (check4(input)) return action4(action_arg); + if (check5(input)) return action5(action_arg); + if (check6(input)) return action6(action_arg); + if (check7(input)) return action7(action_arg); + if (check8(input)) return action8(action_arg); + if (check9(input)) return action9(action_arg); + if (check10(input)) return action10(action_arg); + if (check11(input)) return action11(action_arg); + if (check12(input)) return action12(action_arg); + if (check13(input)) return action13(action_arg); + if (check14(input)) return action14(action_arg); + if (check15(input)) return action15(action_arg); + if (check16(input)) return action16(action_arg); + if (check17(input)) return action17(action_arg); + if (check18(input)) return action18(action_arg); + if (check19(input)) return action19(action_arg); + if (check20(input)) return action20(action_arg); + if (check21(input)) return action21(action_arg); + if (check22(input)) return action22(action_arg); + if (check23(input)) return action23(action_arg); + if (check24(input)) return action24(action_arg); + if (check25(input)) return action25(action_arg); + if (check26(input)) return action26(action_arg); + if (check27(input)) return action27(action_arg); + if (check28(input)) return action28(action_arg); + if (check29(input)) return action29(action_arg); + if (check30(input)) return action30(action_arg); + if (check31(input)) return action31(action_arg); + if (check32(input)) return action32(action_arg); + if (check33(input)) return action33(action_arg); + if (check34(input)) return action34(action_arg); + if (check35(input)) return action35(action_arg); + if (check36(input)) return action36(action_arg); + if (check37(input)) return action37(action_arg); + if (check38(input)) return action38(action_arg); + if (check39(input)) return action39(action_arg); + if (check40(input)) return action40(action_arg); + if (check41(input)) return action41(action_arg); + if (check42(input)) return action42(action_arg); + if (check43(input)) return action43(action_arg); + if (check44(input)) return action44(action_arg); + if (check45(input)) return action45(action_arg); + if (check46(input)) return action46(action_arg); + if (check47(input)) return action47(action_arg); + if (check48(input)) return action48(action_arg); + if (check49(input)) return action49(action_arg); + if (check50(input)) return action50(action_arg); + if (check51(input)) return action51(action_arg); + if (check52(input)) return action52(action_arg); + if (check53(input)) return action53(action_arg); + if (check54(input)) return action54(action_arg); + if (check55(input)) return action55(action_arg); + if (check56(input)) return action56(action_arg); + return action_fail(action_arg); +} + +template < + typename CheckArg, typename ActionArg, typename ActionFail, typename Check0, + typename Check1, typename Check2, typename Check3, typename Check4, + typename Check5, typename Check6, typename Check7, typename Check8, + typename Check9, typename Check10, typename Check11, typename Check12, + typename Check13, typename Check14, typename Check15, typename Check16, + typename Check17, typename Check18, typename Check19, typename Check20, + typename Check21, typename Check22, typename Check23, typename Check24, + typename Check25, typename Check26, typename Check27, typename Check28, + typename Check29, typename Check30, typename Check31, typename Check32, + typename Check33, typename Check34, typename Check35, typename Check36, + typename Check37, typename Check38, typename Check39, typename Check40, + typename Check41, typename Check42, typename Check43, typename Check44, + typename Check45, typename Check46, typename Check47, typename Check48, + typename Check49, typename Check50, typename Check51, typename Check52, + typename Check53, typename Check54, typename Check55, typename Check56, + typename Check57, typename Action0, typename Action1, typename Action2, + typename Action3, typename Action4, typename Action5, typename Action6, + typename Action7, typename Action8, typename Action9, typename Action10, + typename Action11, typename Action12, typename Action13, typename Action14, + typename Action15, typename Action16, typename Action17, typename Action18, + typename Action19, typename Action20, typename Action21, typename Action22, + typename Action23, typename Action24, typename Action25, typename Action26, + typename Action27, typename Action28, typename Action29, typename Action30, + typename Action31, typename Action32, typename Action33, typename Action34, + typename Action35, typename Action36, typename Action37, typename Action38, + typename Action39, typename Action40, typename Action41, typename Action42, + typename Action43, typename Action44, typename Action45, typename Action46, + typename Action47, typename Action48, typename Action49, typename Action50, + typename Action51, typename Action52, typename Action53, typename Action54, + typename Action55, typename Action56, typename Action57> +auto IfList( + CheckArg input, ActionArg action_arg, ActionFail action_fail, Check0 check0, + Check1 check1, Check2 check2, Check3 check3, Check4 check4, Check5 check5, + Check6 check6, Check7 check7, Check8 check8, Check9 check9, Check10 check10, + Check11 check11, Check12 check12, Check13 check13, Check14 check14, + Check15 check15, Check16 check16, Check17 check17, Check18 check18, + Check19 check19, Check20 check20, Check21 check21, Check22 check22, + Check23 check23, Check24 check24, Check25 check25, Check26 check26, + Check27 check27, Check28 check28, Check29 check29, Check30 check30, + Check31 check31, Check32 check32, Check33 check33, Check34 check34, + Check35 check35, Check36 check36, Check37 check37, Check38 check38, + Check39 check39, Check40 check40, Check41 check41, Check42 check42, + Check43 check43, Check44 check44, Check45 check45, Check46 check46, + Check47 check47, Check48 check48, Check49 check49, Check50 check50, + Check51 check51, Check52 check52, Check53 check53, Check54 check54, + Check55 check55, Check56 check56, Check57 check57, Action0 action0, + Action1 action1, Action2 action2, Action3 action3, Action4 action4, + Action5 action5, Action6 action6, Action7 action7, Action8 action8, + Action9 action9, Action10 action10, Action11 action11, Action12 action12, + Action13 action13, Action14 action14, Action15 action15, Action16 action16, + Action17 action17, Action18 action18, Action19 action19, Action20 action20, + Action21 action21, Action22 action22, Action23 action23, Action24 action24, + Action25 action25, Action26 action26, Action27 action27, Action28 action28, + Action29 action29, Action30 action30, Action31 action31, Action32 action32, + Action33 action33, Action34 action34, Action35 action35, Action36 action36, + Action37 action37, Action38 action38, Action39 action39, Action40 action40, + Action41 action41, Action42 action42, Action43 action43, Action44 action44, + Action45 action45, Action46 action46, Action47 action47, Action48 action48, + Action49 action49, Action50 action50, Action51 action51, Action52 action52, + Action53 action53, Action54 action54, Action55 action55, Action56 action56, + Action57 action57) { + if (check0(input)) return action0(action_arg); + if (check1(input)) return action1(action_arg); + if (check2(input)) return action2(action_arg); + if (check3(input)) return action3(action_arg); + if (check4(input)) return action4(action_arg); + if (check5(input)) return action5(action_arg); + if (check6(input)) return action6(action_arg); + if (check7(input)) return action7(action_arg); + if (check8(input)) return action8(action_arg); + if (check9(input)) return action9(action_arg); + if (check10(input)) return action10(action_arg); + if (check11(input)) return action11(action_arg); + if (check12(input)) return action12(action_arg); + if (check13(input)) return action13(action_arg); + if (check14(input)) return action14(action_arg); + if (check15(input)) return action15(action_arg); + if (check16(input)) return action16(action_arg); + if (check17(input)) return action17(action_arg); + if (check18(input)) return action18(action_arg); + if (check19(input)) return action19(action_arg); + if (check20(input)) return action20(action_arg); + if (check21(input)) return action21(action_arg); + if (check22(input)) return action22(action_arg); + if (check23(input)) return action23(action_arg); + if (check24(input)) return action24(action_arg); + if (check25(input)) return action25(action_arg); + if (check26(input)) return action26(action_arg); + if (check27(input)) return action27(action_arg); + if (check28(input)) return action28(action_arg); + if (check29(input)) return action29(action_arg); + if (check30(input)) return action30(action_arg); + if (check31(input)) return action31(action_arg); + if (check32(input)) return action32(action_arg); + if (check33(input)) return action33(action_arg); + if (check34(input)) return action34(action_arg); + if (check35(input)) return action35(action_arg); + if (check36(input)) return action36(action_arg); + if (check37(input)) return action37(action_arg); + if (check38(input)) return action38(action_arg); + if (check39(input)) return action39(action_arg); + if (check40(input)) return action40(action_arg); + if (check41(input)) return action41(action_arg); + if (check42(input)) return action42(action_arg); + if (check43(input)) return action43(action_arg); + if (check44(input)) return action44(action_arg); + if (check45(input)) return action45(action_arg); + if (check46(input)) return action46(action_arg); + if (check47(input)) return action47(action_arg); + if (check48(input)) return action48(action_arg); + if (check49(input)) return action49(action_arg); + if (check50(input)) return action50(action_arg); + if (check51(input)) return action51(action_arg); + if (check52(input)) return action52(action_arg); + if (check53(input)) return action53(action_arg); + if (check54(input)) return action54(action_arg); + if (check55(input)) return action55(action_arg); + if (check56(input)) return action56(action_arg); + if (check57(input)) return action57(action_arg); + return action_fail(action_arg); +} + +template < + typename CheckArg, typename ActionArg, typename ActionFail, typename Check0, + typename Check1, typename Check2, typename Check3, typename Check4, + typename Check5, typename Check6, typename Check7, typename Check8, + typename Check9, typename Check10, typename Check11, typename Check12, + typename Check13, typename Check14, typename Check15, typename Check16, + typename Check17, typename Check18, typename Check19, typename Check20, + typename Check21, typename Check22, typename Check23, typename Check24, + typename Check25, typename Check26, typename Check27, typename Check28, + typename Check29, typename Check30, typename Check31, typename Check32, + typename Check33, typename Check34, typename Check35, typename Check36, + typename Check37, typename Check38, typename Check39, typename Check40, + typename Check41, typename Check42, typename Check43, typename Check44, + typename Check45, typename Check46, typename Check47, typename Check48, + typename Check49, typename Check50, typename Check51, typename Check52, + typename Check53, typename Check54, typename Check55, typename Check56, + typename Check57, typename Check58, typename Action0, typename Action1, + typename Action2, typename Action3, typename Action4, typename Action5, + typename Action6, typename Action7, typename Action8, typename Action9, + typename Action10, typename Action11, typename Action12, typename Action13, + typename Action14, typename Action15, typename Action16, typename Action17, + typename Action18, typename Action19, typename Action20, typename Action21, + typename Action22, typename Action23, typename Action24, typename Action25, + typename Action26, typename Action27, typename Action28, typename Action29, + typename Action30, typename Action31, typename Action32, typename Action33, + typename Action34, typename Action35, typename Action36, typename Action37, + typename Action38, typename Action39, typename Action40, typename Action41, + typename Action42, typename Action43, typename Action44, typename Action45, + typename Action46, typename Action47, typename Action48, typename Action49, + typename Action50, typename Action51, typename Action52, typename Action53, + typename Action54, typename Action55, typename Action56, typename Action57, + typename Action58> +auto IfList( + CheckArg input, ActionArg action_arg, ActionFail action_fail, Check0 check0, + Check1 check1, Check2 check2, Check3 check3, Check4 check4, Check5 check5, + Check6 check6, Check7 check7, Check8 check8, Check9 check9, Check10 check10, + Check11 check11, Check12 check12, Check13 check13, Check14 check14, + Check15 check15, Check16 check16, Check17 check17, Check18 check18, + Check19 check19, Check20 check20, Check21 check21, Check22 check22, + Check23 check23, Check24 check24, Check25 check25, Check26 check26, + Check27 check27, Check28 check28, Check29 check29, Check30 check30, + Check31 check31, Check32 check32, Check33 check33, Check34 check34, + Check35 check35, Check36 check36, Check37 check37, Check38 check38, + Check39 check39, Check40 check40, Check41 check41, Check42 check42, + Check43 check43, Check44 check44, Check45 check45, Check46 check46, + Check47 check47, Check48 check48, Check49 check49, Check50 check50, + Check51 check51, Check52 check52, Check53 check53, Check54 check54, + Check55 check55, Check56 check56, Check57 check57, Check58 check58, + Action0 action0, Action1 action1, Action2 action2, Action3 action3, + Action4 action4, Action5 action5, Action6 action6, Action7 action7, + Action8 action8, Action9 action9, Action10 action10, Action11 action11, + Action12 action12, Action13 action13, Action14 action14, Action15 action15, + Action16 action16, Action17 action17, Action18 action18, Action19 action19, + Action20 action20, Action21 action21, Action22 action22, Action23 action23, + Action24 action24, Action25 action25, Action26 action26, Action27 action27, + Action28 action28, Action29 action29, Action30 action30, Action31 action31, + Action32 action32, Action33 action33, Action34 action34, Action35 action35, + Action36 action36, Action37 action37, Action38 action38, Action39 action39, + Action40 action40, Action41 action41, Action42 action42, Action43 action43, + Action44 action44, Action45 action45, Action46 action46, Action47 action47, + Action48 action48, Action49 action49, Action50 action50, Action51 action51, + Action52 action52, Action53 action53, Action54 action54, Action55 action55, + Action56 action56, Action57 action57, Action58 action58) { + if (check0(input)) return action0(action_arg); + if (check1(input)) return action1(action_arg); + if (check2(input)) return action2(action_arg); + if (check3(input)) return action3(action_arg); + if (check4(input)) return action4(action_arg); + if (check5(input)) return action5(action_arg); + if (check6(input)) return action6(action_arg); + if (check7(input)) return action7(action_arg); + if (check8(input)) return action8(action_arg); + if (check9(input)) return action9(action_arg); + if (check10(input)) return action10(action_arg); + if (check11(input)) return action11(action_arg); + if (check12(input)) return action12(action_arg); + if (check13(input)) return action13(action_arg); + if (check14(input)) return action14(action_arg); + if (check15(input)) return action15(action_arg); + if (check16(input)) return action16(action_arg); + if (check17(input)) return action17(action_arg); + if (check18(input)) return action18(action_arg); + if (check19(input)) return action19(action_arg); + if (check20(input)) return action20(action_arg); + if (check21(input)) return action21(action_arg); + if (check22(input)) return action22(action_arg); + if (check23(input)) return action23(action_arg); + if (check24(input)) return action24(action_arg); + if (check25(input)) return action25(action_arg); + if (check26(input)) return action26(action_arg); + if (check27(input)) return action27(action_arg); + if (check28(input)) return action28(action_arg); + if (check29(input)) return action29(action_arg); + if (check30(input)) return action30(action_arg); + if (check31(input)) return action31(action_arg); + if (check32(input)) return action32(action_arg); + if (check33(input)) return action33(action_arg); + if (check34(input)) return action34(action_arg); + if (check35(input)) return action35(action_arg); + if (check36(input)) return action36(action_arg); + if (check37(input)) return action37(action_arg); + if (check38(input)) return action38(action_arg); + if (check39(input)) return action39(action_arg); + if (check40(input)) return action40(action_arg); + if (check41(input)) return action41(action_arg); + if (check42(input)) return action42(action_arg); + if (check43(input)) return action43(action_arg); + if (check44(input)) return action44(action_arg); + if (check45(input)) return action45(action_arg); + if (check46(input)) return action46(action_arg); + if (check47(input)) return action47(action_arg); + if (check48(input)) return action48(action_arg); + if (check49(input)) return action49(action_arg); + if (check50(input)) return action50(action_arg); + if (check51(input)) return action51(action_arg); + if (check52(input)) return action52(action_arg); + if (check53(input)) return action53(action_arg); + if (check54(input)) return action54(action_arg); + if (check55(input)) return action55(action_arg); + if (check56(input)) return action56(action_arg); + if (check57(input)) return action57(action_arg); + if (check58(input)) return action58(action_arg); + return action_fail(action_arg); +} + +template < + typename CheckArg, typename ActionArg, typename ActionFail, typename Check0, + typename Check1, typename Check2, typename Check3, typename Check4, + typename Check5, typename Check6, typename Check7, typename Check8, + typename Check9, typename Check10, typename Check11, typename Check12, + typename Check13, typename Check14, typename Check15, typename Check16, + typename Check17, typename Check18, typename Check19, typename Check20, + typename Check21, typename Check22, typename Check23, typename Check24, + typename Check25, typename Check26, typename Check27, typename Check28, + typename Check29, typename Check30, typename Check31, typename Check32, + typename Check33, typename Check34, typename Check35, typename Check36, + typename Check37, typename Check38, typename Check39, typename Check40, + typename Check41, typename Check42, typename Check43, typename Check44, + typename Check45, typename Check46, typename Check47, typename Check48, + typename Check49, typename Check50, typename Check51, typename Check52, + typename Check53, typename Check54, typename Check55, typename Check56, + typename Check57, typename Check58, typename Check59, typename Action0, + typename Action1, typename Action2, typename Action3, typename Action4, + typename Action5, typename Action6, typename Action7, typename Action8, + typename Action9, typename Action10, typename Action11, typename Action12, + typename Action13, typename Action14, typename Action15, typename Action16, + typename Action17, typename Action18, typename Action19, typename Action20, + typename Action21, typename Action22, typename Action23, typename Action24, + typename Action25, typename Action26, typename Action27, typename Action28, + typename Action29, typename Action30, typename Action31, typename Action32, + typename Action33, typename Action34, typename Action35, typename Action36, + typename Action37, typename Action38, typename Action39, typename Action40, + typename Action41, typename Action42, typename Action43, typename Action44, + typename Action45, typename Action46, typename Action47, typename Action48, + typename Action49, typename Action50, typename Action51, typename Action52, + typename Action53, typename Action54, typename Action55, typename Action56, + typename Action57, typename Action58, typename Action59> +auto IfList( + CheckArg input, ActionArg action_arg, ActionFail action_fail, Check0 check0, + Check1 check1, Check2 check2, Check3 check3, Check4 check4, Check5 check5, + Check6 check6, Check7 check7, Check8 check8, Check9 check9, Check10 check10, + Check11 check11, Check12 check12, Check13 check13, Check14 check14, + Check15 check15, Check16 check16, Check17 check17, Check18 check18, + Check19 check19, Check20 check20, Check21 check21, Check22 check22, + Check23 check23, Check24 check24, Check25 check25, Check26 check26, + Check27 check27, Check28 check28, Check29 check29, Check30 check30, + Check31 check31, Check32 check32, Check33 check33, Check34 check34, + Check35 check35, Check36 check36, Check37 check37, Check38 check38, + Check39 check39, Check40 check40, Check41 check41, Check42 check42, + Check43 check43, Check44 check44, Check45 check45, Check46 check46, + Check47 check47, Check48 check48, Check49 check49, Check50 check50, + Check51 check51, Check52 check52, Check53 check53, Check54 check54, + Check55 check55, Check56 check56, Check57 check57, Check58 check58, + Check59 check59, Action0 action0, Action1 action1, Action2 action2, + Action3 action3, Action4 action4, Action5 action5, Action6 action6, + Action7 action7, Action8 action8, Action9 action9, Action10 action10, + Action11 action11, Action12 action12, Action13 action13, Action14 action14, + Action15 action15, Action16 action16, Action17 action17, Action18 action18, + Action19 action19, Action20 action20, Action21 action21, Action22 action22, + Action23 action23, Action24 action24, Action25 action25, Action26 action26, + Action27 action27, Action28 action28, Action29 action29, Action30 action30, + Action31 action31, Action32 action32, Action33 action33, Action34 action34, + Action35 action35, Action36 action36, Action37 action37, Action38 action38, + Action39 action39, Action40 action40, Action41 action41, Action42 action42, + Action43 action43, Action44 action44, Action45 action45, Action46 action46, + Action47 action47, Action48 action48, Action49 action49, Action50 action50, + Action51 action51, Action52 action52, Action53 action53, Action54 action54, + Action55 action55, Action56 action56, Action57 action57, Action58 action58, + Action59 action59) { + if (check0(input)) return action0(action_arg); + if (check1(input)) return action1(action_arg); + if (check2(input)) return action2(action_arg); + if (check3(input)) return action3(action_arg); + if (check4(input)) return action4(action_arg); + if (check5(input)) return action5(action_arg); + if (check6(input)) return action6(action_arg); + if (check7(input)) return action7(action_arg); + if (check8(input)) return action8(action_arg); + if (check9(input)) return action9(action_arg); + if (check10(input)) return action10(action_arg); + if (check11(input)) return action11(action_arg); + if (check12(input)) return action12(action_arg); + if (check13(input)) return action13(action_arg); + if (check14(input)) return action14(action_arg); + if (check15(input)) return action15(action_arg); + if (check16(input)) return action16(action_arg); + if (check17(input)) return action17(action_arg); + if (check18(input)) return action18(action_arg); + if (check19(input)) return action19(action_arg); + if (check20(input)) return action20(action_arg); + if (check21(input)) return action21(action_arg); + if (check22(input)) return action22(action_arg); + if (check23(input)) return action23(action_arg); + if (check24(input)) return action24(action_arg); + if (check25(input)) return action25(action_arg); + if (check26(input)) return action26(action_arg); + if (check27(input)) return action27(action_arg); + if (check28(input)) return action28(action_arg); + if (check29(input)) return action29(action_arg); + if (check30(input)) return action30(action_arg); + if (check31(input)) return action31(action_arg); + if (check32(input)) return action32(action_arg); + if (check33(input)) return action33(action_arg); + if (check34(input)) return action34(action_arg); + if (check35(input)) return action35(action_arg); + if (check36(input)) return action36(action_arg); + if (check37(input)) return action37(action_arg); + if (check38(input)) return action38(action_arg); + if (check39(input)) return action39(action_arg); + if (check40(input)) return action40(action_arg); + if (check41(input)) return action41(action_arg); + if (check42(input)) return action42(action_arg); + if (check43(input)) return action43(action_arg); + if (check44(input)) return action44(action_arg); + if (check45(input)) return action45(action_arg); + if (check46(input)) return action46(action_arg); + if (check47(input)) return action47(action_arg); + if (check48(input)) return action48(action_arg); + if (check49(input)) return action49(action_arg); + if (check50(input)) return action50(action_arg); + if (check51(input)) return action51(action_arg); + if (check52(input)) return action52(action_arg); + if (check53(input)) return action53(action_arg); + if (check54(input)) return action54(action_arg); + if (check55(input)) return action55(action_arg); + if (check56(input)) return action56(action_arg); + if (check57(input)) return action57(action_arg); + if (check58(input)) return action58(action_arg); + if (check59(input)) return action59(action_arg); + return action_fail(action_arg); +} + +template < + typename CheckArg, typename ActionArg, typename ActionFail, typename Check0, + typename Check1, typename Check2, typename Check3, typename Check4, + typename Check5, typename Check6, typename Check7, typename Check8, + typename Check9, typename Check10, typename Check11, typename Check12, + typename Check13, typename Check14, typename Check15, typename Check16, + typename Check17, typename Check18, typename Check19, typename Check20, + typename Check21, typename Check22, typename Check23, typename Check24, + typename Check25, typename Check26, typename Check27, typename Check28, + typename Check29, typename Check30, typename Check31, typename Check32, + typename Check33, typename Check34, typename Check35, typename Check36, + typename Check37, typename Check38, typename Check39, typename Check40, + typename Check41, typename Check42, typename Check43, typename Check44, + typename Check45, typename Check46, typename Check47, typename Check48, + typename Check49, typename Check50, typename Check51, typename Check52, + typename Check53, typename Check54, typename Check55, typename Check56, + typename Check57, typename Check58, typename Check59, typename Check60, + typename Action0, typename Action1, typename Action2, typename Action3, + typename Action4, typename Action5, typename Action6, typename Action7, + typename Action8, typename Action9, typename Action10, typename Action11, + typename Action12, typename Action13, typename Action14, typename Action15, + typename Action16, typename Action17, typename Action18, typename Action19, + typename Action20, typename Action21, typename Action22, typename Action23, + typename Action24, typename Action25, typename Action26, typename Action27, + typename Action28, typename Action29, typename Action30, typename Action31, + typename Action32, typename Action33, typename Action34, typename Action35, + typename Action36, typename Action37, typename Action38, typename Action39, + typename Action40, typename Action41, typename Action42, typename Action43, + typename Action44, typename Action45, typename Action46, typename Action47, + typename Action48, typename Action49, typename Action50, typename Action51, + typename Action52, typename Action53, typename Action54, typename Action55, + typename Action56, typename Action57, typename Action58, typename Action59, + typename Action60> +auto IfList( + CheckArg input, ActionArg action_arg, ActionFail action_fail, Check0 check0, + Check1 check1, Check2 check2, Check3 check3, Check4 check4, Check5 check5, + Check6 check6, Check7 check7, Check8 check8, Check9 check9, Check10 check10, + Check11 check11, Check12 check12, Check13 check13, Check14 check14, + Check15 check15, Check16 check16, Check17 check17, Check18 check18, + Check19 check19, Check20 check20, Check21 check21, Check22 check22, + Check23 check23, Check24 check24, Check25 check25, Check26 check26, + Check27 check27, Check28 check28, Check29 check29, Check30 check30, + Check31 check31, Check32 check32, Check33 check33, Check34 check34, + Check35 check35, Check36 check36, Check37 check37, Check38 check38, + Check39 check39, Check40 check40, Check41 check41, Check42 check42, + Check43 check43, Check44 check44, Check45 check45, Check46 check46, + Check47 check47, Check48 check48, Check49 check49, Check50 check50, + Check51 check51, Check52 check52, Check53 check53, Check54 check54, + Check55 check55, Check56 check56, Check57 check57, Check58 check58, + Check59 check59, Check60 check60, Action0 action0, Action1 action1, + Action2 action2, Action3 action3, Action4 action4, Action5 action5, + Action6 action6, Action7 action7, Action8 action8, Action9 action9, + Action10 action10, Action11 action11, Action12 action12, Action13 action13, + Action14 action14, Action15 action15, Action16 action16, Action17 action17, + Action18 action18, Action19 action19, Action20 action20, Action21 action21, + Action22 action22, Action23 action23, Action24 action24, Action25 action25, + Action26 action26, Action27 action27, Action28 action28, Action29 action29, + Action30 action30, Action31 action31, Action32 action32, Action33 action33, + Action34 action34, Action35 action35, Action36 action36, Action37 action37, + Action38 action38, Action39 action39, Action40 action40, Action41 action41, + Action42 action42, Action43 action43, Action44 action44, Action45 action45, + Action46 action46, Action47 action47, Action48 action48, Action49 action49, + Action50 action50, Action51 action51, Action52 action52, Action53 action53, + Action54 action54, Action55 action55, Action56 action56, Action57 action57, + Action58 action58, Action59 action59, Action60 action60) { + if (check0(input)) return action0(action_arg); + if (check1(input)) return action1(action_arg); + if (check2(input)) return action2(action_arg); + if (check3(input)) return action3(action_arg); + if (check4(input)) return action4(action_arg); + if (check5(input)) return action5(action_arg); + if (check6(input)) return action6(action_arg); + if (check7(input)) return action7(action_arg); + if (check8(input)) return action8(action_arg); + if (check9(input)) return action9(action_arg); + if (check10(input)) return action10(action_arg); + if (check11(input)) return action11(action_arg); + if (check12(input)) return action12(action_arg); + if (check13(input)) return action13(action_arg); + if (check14(input)) return action14(action_arg); + if (check15(input)) return action15(action_arg); + if (check16(input)) return action16(action_arg); + if (check17(input)) return action17(action_arg); + if (check18(input)) return action18(action_arg); + if (check19(input)) return action19(action_arg); + if (check20(input)) return action20(action_arg); + if (check21(input)) return action21(action_arg); + if (check22(input)) return action22(action_arg); + if (check23(input)) return action23(action_arg); + if (check24(input)) return action24(action_arg); + if (check25(input)) return action25(action_arg); + if (check26(input)) return action26(action_arg); + if (check27(input)) return action27(action_arg); + if (check28(input)) return action28(action_arg); + if (check29(input)) return action29(action_arg); + if (check30(input)) return action30(action_arg); + if (check31(input)) return action31(action_arg); + if (check32(input)) return action32(action_arg); + if (check33(input)) return action33(action_arg); + if (check34(input)) return action34(action_arg); + if (check35(input)) return action35(action_arg); + if (check36(input)) return action36(action_arg); + if (check37(input)) return action37(action_arg); + if (check38(input)) return action38(action_arg); + if (check39(input)) return action39(action_arg); + if (check40(input)) return action40(action_arg); + if (check41(input)) return action41(action_arg); + if (check42(input)) return action42(action_arg); + if (check43(input)) return action43(action_arg); + if (check44(input)) return action44(action_arg); + if (check45(input)) return action45(action_arg); + if (check46(input)) return action46(action_arg); + if (check47(input)) return action47(action_arg); + if (check48(input)) return action48(action_arg); + if (check49(input)) return action49(action_arg); + if (check50(input)) return action50(action_arg); + if (check51(input)) return action51(action_arg); + if (check52(input)) return action52(action_arg); + if (check53(input)) return action53(action_arg); + if (check54(input)) return action54(action_arg); + if (check55(input)) return action55(action_arg); + if (check56(input)) return action56(action_arg); + if (check57(input)) return action57(action_arg); + if (check58(input)) return action58(action_arg); + if (check59(input)) return action59(action_arg); + if (check60(input)) return action60(action_arg); + return action_fail(action_arg); +} + +template < + typename CheckArg, typename ActionArg, typename ActionFail, typename Check0, + typename Check1, typename Check2, typename Check3, typename Check4, + typename Check5, typename Check6, typename Check7, typename Check8, + typename Check9, typename Check10, typename Check11, typename Check12, + typename Check13, typename Check14, typename Check15, typename Check16, + typename Check17, typename Check18, typename Check19, typename Check20, + typename Check21, typename Check22, typename Check23, typename Check24, + typename Check25, typename Check26, typename Check27, typename Check28, + typename Check29, typename Check30, typename Check31, typename Check32, + typename Check33, typename Check34, typename Check35, typename Check36, + typename Check37, typename Check38, typename Check39, typename Check40, + typename Check41, typename Check42, typename Check43, typename Check44, + typename Check45, typename Check46, typename Check47, typename Check48, + typename Check49, typename Check50, typename Check51, typename Check52, + typename Check53, typename Check54, typename Check55, typename Check56, + typename Check57, typename Check58, typename Check59, typename Check60, + typename Check61, typename Action0, typename Action1, typename Action2, + typename Action3, typename Action4, typename Action5, typename Action6, + typename Action7, typename Action8, typename Action9, typename Action10, + typename Action11, typename Action12, typename Action13, typename Action14, + typename Action15, typename Action16, typename Action17, typename Action18, + typename Action19, typename Action20, typename Action21, typename Action22, + typename Action23, typename Action24, typename Action25, typename Action26, + typename Action27, typename Action28, typename Action29, typename Action30, + typename Action31, typename Action32, typename Action33, typename Action34, + typename Action35, typename Action36, typename Action37, typename Action38, + typename Action39, typename Action40, typename Action41, typename Action42, + typename Action43, typename Action44, typename Action45, typename Action46, + typename Action47, typename Action48, typename Action49, typename Action50, + typename Action51, typename Action52, typename Action53, typename Action54, + typename Action55, typename Action56, typename Action57, typename Action58, + typename Action59, typename Action60, typename Action61> +auto IfList( + CheckArg input, ActionArg action_arg, ActionFail action_fail, Check0 check0, + Check1 check1, Check2 check2, Check3 check3, Check4 check4, Check5 check5, + Check6 check6, Check7 check7, Check8 check8, Check9 check9, Check10 check10, + Check11 check11, Check12 check12, Check13 check13, Check14 check14, + Check15 check15, Check16 check16, Check17 check17, Check18 check18, + Check19 check19, Check20 check20, Check21 check21, Check22 check22, + Check23 check23, Check24 check24, Check25 check25, Check26 check26, + Check27 check27, Check28 check28, Check29 check29, Check30 check30, + Check31 check31, Check32 check32, Check33 check33, Check34 check34, + Check35 check35, Check36 check36, Check37 check37, Check38 check38, + Check39 check39, Check40 check40, Check41 check41, Check42 check42, + Check43 check43, Check44 check44, Check45 check45, Check46 check46, + Check47 check47, Check48 check48, Check49 check49, Check50 check50, + Check51 check51, Check52 check52, Check53 check53, Check54 check54, + Check55 check55, Check56 check56, Check57 check57, Check58 check58, + Check59 check59, Check60 check60, Check61 check61, Action0 action0, + Action1 action1, Action2 action2, Action3 action3, Action4 action4, + Action5 action5, Action6 action6, Action7 action7, Action8 action8, + Action9 action9, Action10 action10, Action11 action11, Action12 action12, + Action13 action13, Action14 action14, Action15 action15, Action16 action16, + Action17 action17, Action18 action18, Action19 action19, Action20 action20, + Action21 action21, Action22 action22, Action23 action23, Action24 action24, + Action25 action25, Action26 action26, Action27 action27, Action28 action28, + Action29 action29, Action30 action30, Action31 action31, Action32 action32, + Action33 action33, Action34 action34, Action35 action35, Action36 action36, + Action37 action37, Action38 action38, Action39 action39, Action40 action40, + Action41 action41, Action42 action42, Action43 action43, Action44 action44, + Action45 action45, Action46 action46, Action47 action47, Action48 action48, + Action49 action49, Action50 action50, Action51 action51, Action52 action52, + Action53 action53, Action54 action54, Action55 action55, Action56 action56, + Action57 action57, Action58 action58, Action59 action59, Action60 action60, + Action61 action61) { + if (check0(input)) return action0(action_arg); + if (check1(input)) return action1(action_arg); + if (check2(input)) return action2(action_arg); + if (check3(input)) return action3(action_arg); + if (check4(input)) return action4(action_arg); + if (check5(input)) return action5(action_arg); + if (check6(input)) return action6(action_arg); + if (check7(input)) return action7(action_arg); + if (check8(input)) return action8(action_arg); + if (check9(input)) return action9(action_arg); + if (check10(input)) return action10(action_arg); + if (check11(input)) return action11(action_arg); + if (check12(input)) return action12(action_arg); + if (check13(input)) return action13(action_arg); + if (check14(input)) return action14(action_arg); + if (check15(input)) return action15(action_arg); + if (check16(input)) return action16(action_arg); + if (check17(input)) return action17(action_arg); + if (check18(input)) return action18(action_arg); + if (check19(input)) return action19(action_arg); + if (check20(input)) return action20(action_arg); + if (check21(input)) return action21(action_arg); + if (check22(input)) return action22(action_arg); + if (check23(input)) return action23(action_arg); + if (check24(input)) return action24(action_arg); + if (check25(input)) return action25(action_arg); + if (check26(input)) return action26(action_arg); + if (check27(input)) return action27(action_arg); + if (check28(input)) return action28(action_arg); + if (check29(input)) return action29(action_arg); + if (check30(input)) return action30(action_arg); + if (check31(input)) return action31(action_arg); + if (check32(input)) return action32(action_arg); + if (check33(input)) return action33(action_arg); + if (check34(input)) return action34(action_arg); + if (check35(input)) return action35(action_arg); + if (check36(input)) return action36(action_arg); + if (check37(input)) return action37(action_arg); + if (check38(input)) return action38(action_arg); + if (check39(input)) return action39(action_arg); + if (check40(input)) return action40(action_arg); + if (check41(input)) return action41(action_arg); + if (check42(input)) return action42(action_arg); + if (check43(input)) return action43(action_arg); + if (check44(input)) return action44(action_arg); + if (check45(input)) return action45(action_arg); + if (check46(input)) return action46(action_arg); + if (check47(input)) return action47(action_arg); + if (check48(input)) return action48(action_arg); + if (check49(input)) return action49(action_arg); + if (check50(input)) return action50(action_arg); + if (check51(input)) return action51(action_arg); + if (check52(input)) return action52(action_arg); + if (check53(input)) return action53(action_arg); + if (check54(input)) return action54(action_arg); + if (check55(input)) return action55(action_arg); + if (check56(input)) return action56(action_arg); + if (check57(input)) return action57(action_arg); + if (check58(input)) return action58(action_arg); + if (check59(input)) return action59(action_arg); + if (check60(input)) return action60(action_arg); + if (check61(input)) return action61(action_arg); + return action_fail(action_arg); +} + +template < + typename CheckArg, typename ActionArg, typename ActionFail, typename Check0, + typename Check1, typename Check2, typename Check3, typename Check4, + typename Check5, typename Check6, typename Check7, typename Check8, + typename Check9, typename Check10, typename Check11, typename Check12, + typename Check13, typename Check14, typename Check15, typename Check16, + typename Check17, typename Check18, typename Check19, typename Check20, + typename Check21, typename Check22, typename Check23, typename Check24, + typename Check25, typename Check26, typename Check27, typename Check28, + typename Check29, typename Check30, typename Check31, typename Check32, + typename Check33, typename Check34, typename Check35, typename Check36, + typename Check37, typename Check38, typename Check39, typename Check40, + typename Check41, typename Check42, typename Check43, typename Check44, + typename Check45, typename Check46, typename Check47, typename Check48, + typename Check49, typename Check50, typename Check51, typename Check52, + typename Check53, typename Check54, typename Check55, typename Check56, + typename Check57, typename Check58, typename Check59, typename Check60, + typename Check61, typename Check62, typename Action0, typename Action1, + typename Action2, typename Action3, typename Action4, typename Action5, + typename Action6, typename Action7, typename Action8, typename Action9, + typename Action10, typename Action11, typename Action12, typename Action13, + typename Action14, typename Action15, typename Action16, typename Action17, + typename Action18, typename Action19, typename Action20, typename Action21, + typename Action22, typename Action23, typename Action24, typename Action25, + typename Action26, typename Action27, typename Action28, typename Action29, + typename Action30, typename Action31, typename Action32, typename Action33, + typename Action34, typename Action35, typename Action36, typename Action37, + typename Action38, typename Action39, typename Action40, typename Action41, + typename Action42, typename Action43, typename Action44, typename Action45, + typename Action46, typename Action47, typename Action48, typename Action49, + typename Action50, typename Action51, typename Action52, typename Action53, + typename Action54, typename Action55, typename Action56, typename Action57, + typename Action58, typename Action59, typename Action60, typename Action61, + typename Action62> +auto IfList( + CheckArg input, ActionArg action_arg, ActionFail action_fail, Check0 check0, + Check1 check1, Check2 check2, Check3 check3, Check4 check4, Check5 check5, + Check6 check6, Check7 check7, Check8 check8, Check9 check9, Check10 check10, + Check11 check11, Check12 check12, Check13 check13, Check14 check14, + Check15 check15, Check16 check16, Check17 check17, Check18 check18, + Check19 check19, Check20 check20, Check21 check21, Check22 check22, + Check23 check23, Check24 check24, Check25 check25, Check26 check26, + Check27 check27, Check28 check28, Check29 check29, Check30 check30, + Check31 check31, Check32 check32, Check33 check33, Check34 check34, + Check35 check35, Check36 check36, Check37 check37, Check38 check38, + Check39 check39, Check40 check40, Check41 check41, Check42 check42, + Check43 check43, Check44 check44, Check45 check45, Check46 check46, + Check47 check47, Check48 check48, Check49 check49, Check50 check50, + Check51 check51, Check52 check52, Check53 check53, Check54 check54, + Check55 check55, Check56 check56, Check57 check57, Check58 check58, + Check59 check59, Check60 check60, Check61 check61, Check62 check62, + Action0 action0, Action1 action1, Action2 action2, Action3 action3, + Action4 action4, Action5 action5, Action6 action6, Action7 action7, + Action8 action8, Action9 action9, Action10 action10, Action11 action11, + Action12 action12, Action13 action13, Action14 action14, Action15 action15, + Action16 action16, Action17 action17, Action18 action18, Action19 action19, + Action20 action20, Action21 action21, Action22 action22, Action23 action23, + Action24 action24, Action25 action25, Action26 action26, Action27 action27, + Action28 action28, Action29 action29, Action30 action30, Action31 action31, + Action32 action32, Action33 action33, Action34 action34, Action35 action35, + Action36 action36, Action37 action37, Action38 action38, Action39 action39, + Action40 action40, Action41 action41, Action42 action42, Action43 action43, + Action44 action44, Action45 action45, Action46 action46, Action47 action47, + Action48 action48, Action49 action49, Action50 action50, Action51 action51, + Action52 action52, Action53 action53, Action54 action54, Action55 action55, + Action56 action56, Action57 action57, Action58 action58, Action59 action59, + Action60 action60, Action61 action61, Action62 action62) { + if (check0(input)) return action0(action_arg); + if (check1(input)) return action1(action_arg); + if (check2(input)) return action2(action_arg); + if (check3(input)) return action3(action_arg); + if (check4(input)) return action4(action_arg); + if (check5(input)) return action5(action_arg); + if (check6(input)) return action6(action_arg); + if (check7(input)) return action7(action_arg); + if (check8(input)) return action8(action_arg); + if (check9(input)) return action9(action_arg); + if (check10(input)) return action10(action_arg); + if (check11(input)) return action11(action_arg); + if (check12(input)) return action12(action_arg); + if (check13(input)) return action13(action_arg); + if (check14(input)) return action14(action_arg); + if (check15(input)) return action15(action_arg); + if (check16(input)) return action16(action_arg); + if (check17(input)) return action17(action_arg); + if (check18(input)) return action18(action_arg); + if (check19(input)) return action19(action_arg); + if (check20(input)) return action20(action_arg); + if (check21(input)) return action21(action_arg); + if (check22(input)) return action22(action_arg); + if (check23(input)) return action23(action_arg); + if (check24(input)) return action24(action_arg); + if (check25(input)) return action25(action_arg); + if (check26(input)) return action26(action_arg); + if (check27(input)) return action27(action_arg); + if (check28(input)) return action28(action_arg); + if (check29(input)) return action29(action_arg); + if (check30(input)) return action30(action_arg); + if (check31(input)) return action31(action_arg); + if (check32(input)) return action32(action_arg); + if (check33(input)) return action33(action_arg); + if (check34(input)) return action34(action_arg); + if (check35(input)) return action35(action_arg); + if (check36(input)) return action36(action_arg); + if (check37(input)) return action37(action_arg); + if (check38(input)) return action38(action_arg); + if (check39(input)) return action39(action_arg); + if (check40(input)) return action40(action_arg); + if (check41(input)) return action41(action_arg); + if (check42(input)) return action42(action_arg); + if (check43(input)) return action43(action_arg); + if (check44(input)) return action44(action_arg); + if (check45(input)) return action45(action_arg); + if (check46(input)) return action46(action_arg); + if (check47(input)) return action47(action_arg); + if (check48(input)) return action48(action_arg); + if (check49(input)) return action49(action_arg); + if (check50(input)) return action50(action_arg); + if (check51(input)) return action51(action_arg); + if (check52(input)) return action52(action_arg); + if (check53(input)) return action53(action_arg); + if (check54(input)) return action54(action_arg); + if (check55(input)) return action55(action_arg); + if (check56(input)) return action56(action_arg); + if (check57(input)) return action57(action_arg); + if (check58(input)) return action58(action_arg); + if (check59(input)) return action59(action_arg); + if (check60(input)) return action60(action_arg); + if (check61(input)) return action61(action_arg); + if (check62(input)) return action62(action_arg); + return action_fail(action_arg); +} + +} // namespace grpc_core + +#endif // GRPC_SRC_CORE_LIB_GPRPP_IF_LIST_H diff --git a/src/core/lib/gprpp/sorted_pack.h b/src/core/lib/gprpp/sorted_pack.h index 9cda349aca1..904dcecca77 100644 --- a/src/core/lib/gprpp/sorted_pack.h +++ b/src/core/lib/gprpp/sorted_pack.h @@ -19,20 +19,12 @@ #include +#include "src/core/lib/gprpp/type_list.h" + namespace grpc_core { namespace sorted_pack_detail { -// A list of types -template -struct Typelist { - template