Followup on an answer from last night - I was hoping more comments would answer this for me but no dice.
Is there a way to achieve this without inheritance that does not require the cumbersome usage in the penultimate line of code below, which writes the value to cout
?
struct A {
enum E {
X, Y, Z
};
};
template <class T>
struct B {
typedef typename T::E E;
};
// basically "import" the A::E enum into B.
int main(void)
{
std::cout << B<A>::E::X << std::endl;
return 0;
}