Home | History | Annotate | Download | only in temp.explicit
      1 // RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s
      2 
      3 template<typename T>
      4 struct X0 {
      5   struct MemberClass;
      6 
      7   T* f0(T* ptr);
      8 
      9   static T* static_member;
     10 };
     11 
     12 template class X0<int(int)>; // ok; nothing gets instantiated.
     13 
     14 template<typename T>
     15 struct X0<T>::MemberClass {
     16   T member;
     17 };
     18 
     19 template<typename T>
     20 T* X0<T>::f0(T* ptr) {
     21   return ptr + 1;
     22 }
     23 
     24 template<typename T>
     25 T* X0<T>::static_member = 0;
     26 
     27 template class X0<int>; // ok
     28 
     29 
     30 template<typename T>
     31 struct X1 {
     32   enum class E {
     33     e = T::error // expected-error 2{{no members}}
     34   };
     35 };
     36 template struct X1<int>; // expected-note {{here}}
     37 
     38 extern template struct X1<char>; // ok
     39 
     40 template struct X1<char>; // expected-note {{here}}
     41