1 // RUN: %clang_cc1 -fsyntax-only -verify %s
2 // expected-no-diagnostics
3 
4 class X {
5   template <typename T> class Y {};
6 };
7 
8 class A {
9   class B {};
10   class C {};
11 };
12 
13 // C++0x [temp.explicit] 14.7.2/11:
14 //   The usual access checking rules do not apply to names used to specify
15 //   explicit instantiations.
16 template class X::Y<A::B>;
17 
18 // As an extension, this rule is applied to explicit specializations as well.
19 template <> class X::Y<A::C> {};
20