Following may help:
struct Data
{
std::tuple>,
std::set- >,
std::set
- >,
std::set
- >,
std::set
- >> items;
template
bool contains(const Item& x) const {
static_assert(0 < N && N < 6, "N out of range");
return std::get(items).find(x) != std::get(items).end();
}
};