edit: I\'ll put a github link here when I am done altering my design for anyone who is interested.
Background
I\'m replacing a
Another possibility (that might or might not save you keystrokes) would be not using the derived classes' nested types in the parent in some places. Eg. instead of
void foo(typename TWO::dummy & d);
you'd use
template
void foo(typename T& d);
For extra points, you could use SFINAE to actually limit T
to the types permissible for the original variant. (Note that inside nested templates, TWO::dummy
can be used freely - they are only instantiated after the whole thing incl. derived
has been, so it works out. In the naive version, derived
is still incomplete at the point of instantiating the base
with its member functions, it has no ::dummy
, which is why it fails)