I have a basic type Item
which depends on an integer template parameter N
and class Data
which holds instances of Item
How about something with a "type list", like so:
template struct Data;
template <> struct Data<> {};
template
struct Data : Data
{
std::set- > item;
bool contains(const Item
& x) const { return item.find(x) != item.end(); }
};
Usage:
Data<2, 8, 19> data; // contains sets of Item<2>, Item<8> and Item<19>