Hi Andrew,

Yes and maybe use tree for the type of op_list instead of auto.
I suspect this code was originally written before GCC was written in C++11.
Maybe if this code is being compiled with C++20 we could do something like:
#include <concepts>
template< std::same_as<tree>... op_types>

To get a decent error message earlier ...

Or I think it's easier to understand without using a template by changing it to the following:

inline
gimple_match_op::gimple_match_op (const gimple_match_cond &cond_in,
                                  code_helper code_in, tree type_in,
                                  tree ops[], int num_op)
{
  for (int i = 0; i < num_op)
    this->ops[i] = ops[i];
}

--
Best,
Lehua (RiVAI)
lehua.d...@rivai.ai

Reply via email to