struct X {};

struct A {
  template<class T>
  struct B;
};

template<>
struct A::B<X> {};

int main() {
  typedef A::B<X> b_t;
  b_t b;
  return 0;
}

Add a code snippet to your website: www.paste.org