1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
template<bool> struct a_t; template<> struct a_t<true> { template<int> struct b {}; }; template<> struct a_t<false> { enum { b }; }; typedef a_t<sizeof(void*)==sizeof(int)> a; enum { c, d }; int main() { a::b<c>d; // declaration or expression? }