I want to give an enum multiple aliases, but force the calling code to use one specific alias when passing an enum value to a specific class. Here's my bright idea, which doesn't work:
template<typename Stype>
struct MoreDifferentS : Stype {};
struct S {
enum consumate {
v,
vv
};
};
class Dragon {
void Burn(S::consumate type) {};
public:
using mdS = MoreDifferentS<S>;
void Burn(mdS::consumate type) {};
};
//Usage:
Dragon d;
d.Burn(S::v); //I don't want this to compile
d.Burn(mdS::v); //I want this to compile
The problem with this, is that the compiler still sees both functions as taking the same argument type, and throwing either "member function already defined or declared", or throwing "function Burn(S::consumate) inaccessible" when I try to call Burn(mdS::v). Is there some around this, or am I barking up entirely the wrong tree?
Thanks