1ca4686dcSDouglas Gregor // RUN: %clang_cc1 -fsyntax-only -verify %s 2*c6e68daaSAndy Gibbs // expected-no-diagnostics 3ca4686dcSDouglas Gregor 4ca4686dcSDouglas Gregor // PR8905 5ca4686dcSDouglas Gregor template<char C1, char C2> 6ca4686dcSDouglas Gregor struct X { 7ca4686dcSDouglas Gregor static const bool value = 0; 8ca4686dcSDouglas Gregor }; 9ca4686dcSDouglas Gregor 10ca4686dcSDouglas Gregor template<int C1> 11ca4686dcSDouglas Gregor struct X<C1, C1> { 12ca4686dcSDouglas Gregor static const bool value = 1; 13ca4686dcSDouglas Gregor }; 14ca4686dcSDouglas Gregor 15ca4686dcSDouglas Gregor int check0[X<1, 2>::value == 0? 1 : -1]; 16ca4686dcSDouglas Gregor int check1[X<1, 1>::value == 1? 1 : -1]; 17ca4686dcSDouglas Gregor 18ca4686dcSDouglas Gregor template<int, int, int> struct int_values { 19ca4686dcSDouglas Gregor static const unsigned value = 0; 20ca4686dcSDouglas Gregor }; 21ca4686dcSDouglas Gregor 22ca4686dcSDouglas Gregor template<unsigned char C1, unsigned char C3> 23ca4686dcSDouglas Gregor struct int_values<C1, 12, C3> { 24ca4686dcSDouglas Gregor static const unsigned value = 1; 25ca4686dcSDouglas Gregor }; 26ca4686dcSDouglas Gregor 27ca4686dcSDouglas Gregor int check2[int_values<256, 12, 3>::value == 0? 1 : -1]; 28