How to have enum type of any tag in a class specialization?
as this works only for one ie. L enum :
enum class K
{
a, b, c, d, e
};
enum class L
{
a, c, e,
};
template<enum L>
struct J
{
constexpr static int N = static_cast<int>(L::e);
int n[N] = { 7 };
void print()
{
cout << N << "\n";
}
};
int main()
{
J <L::e> obj;
obj.print();
return 0;
}
How to have it works as common such for K and any enum tag as long as it has the same e member name?