Use lambdas and pack expansion to reduce template instantiations in action_dispatch

2 jobs for improved-action-dispatch in 157 minutes and 26 seconds (queued for 3 seconds)
Status Job ID Name Coverage
  Test
passed #4828
amd64
job_clang_amd64

02:37:26

passed #4827
amd64
job_gcc_amd64

01:54:45