Home | History | Annotate | Download | only in temp.expl.spec
      1 // RUN: %clang_cc1 -fsyntax-only -verify %s
      2 
      3 struct NonDefaultConstructible {
      4   NonDefaultConstructible(const NonDefaultConstructible&); // expected-note{{candidate constructor}}
      5 };
      6 
      7 template<typename T, typename U>
      8 struct X {
      9   static T member;
     10 };
     11 
     12 template<typename T, typename U>
     13 T X<T, U>::member; // expected-error{{no matching constructor}}
     14 
     15 // Okay; this is a declaration, not a definition.
     16 template<>
     17 NonDefaultConstructible X<NonDefaultConstructible, long>::member;
     18 
     19 NonDefaultConstructible &test(bool b) {
     20   return b? X<NonDefaultConstructible, int>::member // expected-note{{instantiation}}
     21           : X<NonDefaultConstructible, long>::member;
     22 }
     23 
     24 namespace rdar9422013 {
     25   template<int>
     26   struct X {
     27     struct Inner {
     28       static unsigned array[17];
     29     };
     30   };
     31 
     32   template<> unsigned X<1>::Inner::array[]; // okay
     33 }
     34