Suppose I have:
struct Magic {
Magic(Foo* foo);
Magic(Bar* bar);
};
Is there a way to make Magic a template, and define template classes s.t.
typedef Magic<FooPolicy, ...> MagicFoo;
typedef Magic<BarPolicy, ...> MagicBar;
typedef Magic<..., ...> MagicNone;
typedef Magic<FooPolicy, BarPolicy> MagicAll;
s.t. MagicFoo & MagicAll have the Foo* constructor; MagicBar & MagicAll has the Bar* constructor; and MagicNone nas neither the Foo* nor the Bar* constructor?
Basically I want constructors to exist or not exist based on policy classes.