So, I already have a workable solution, but i want to know if there is any other way to handle this, in case i'm missing something obvious and simple.
What i want to express
if((a==c)||...)
where c
is a parameter pack and a
is a variable. Basically I want it expanded to
if( (a == c1) || (a == c2) ... etc)
As a MRE
template <typename A, typename... C>
void foo(A a, C... c) const
{
if((a == c)||...)
return;
}
The solution i ended up going with was
if (
[](auto a, auto c1, auto c2)
{
return a.value == c1 || a.value == c2;
}(a, c...))