Home | History | Annotate | Download | only in temp.class.spec
      1 // RUN: %clang_cc1 -fsyntax-only -verify %s
      2 
      3 // PR8905
      4 template<char C1, char C2>
      5 struct X {
      6   static const bool value = 0;
      7 };
      8 
      9 template<int C1>
     10 struct X<C1, C1> {
     11   static const bool value = 1;
     12 };
     13 
     14 int check0[X<1, 2>::value == 0? 1 : -1];
     15 int check1[X<1, 1>::value == 1? 1 : -1];
     16 
     17 template<int, int, int> struct int_values {
     18   static const unsigned value = 0;
     19 };
     20 
     21 template<unsigned char C1, unsigned char C3>
     22 struct int_values<C1, 12, C3> {
     23   static const unsigned value = 1;
     24 };
     25 
     26 int check2[int_values<256, 12, 3>::value == 0? 1 : -1];
     27