154c53cca105ed595e12fecf04e415c3712bda936Douglas Gregor// RUN: %clang_cc1 -fsyntax-only -verify %s 28e8fb3be5bd78f0564444eca02b404566a5f3b5dAndy Gibbs// expected-no-diagnostics 354c53cca105ed595e12fecf04e415c3712bda936Douglas Gregor 454c53cca105ed595e12fecf04e415c3712bda936Douglas Gregor// PR8905 554c53cca105ed595e12fecf04e415c3712bda936Douglas Gregortemplate<char C1, char C2> 654c53cca105ed595e12fecf04e415c3712bda936Douglas Gregorstruct X { 754c53cca105ed595e12fecf04e415c3712bda936Douglas Gregor static const bool value = 0; 854c53cca105ed595e12fecf04e415c3712bda936Douglas Gregor}; 954c53cca105ed595e12fecf04e415c3712bda936Douglas Gregor 1054c53cca105ed595e12fecf04e415c3712bda936Douglas Gregortemplate<int C1> 1154c53cca105ed595e12fecf04e415c3712bda936Douglas Gregorstruct X<C1, C1> { 1254c53cca105ed595e12fecf04e415c3712bda936Douglas Gregor static const bool value = 1; 1354c53cca105ed595e12fecf04e415c3712bda936Douglas Gregor}; 1454c53cca105ed595e12fecf04e415c3712bda936Douglas Gregor 1554c53cca105ed595e12fecf04e415c3712bda936Douglas Gregorint check0[X<1, 2>::value == 0? 1 : -1]; 1654c53cca105ed595e12fecf04e415c3712bda936Douglas Gregorint check1[X<1, 1>::value == 1? 1 : -1]; 1754c53cca105ed595e12fecf04e415c3712bda936Douglas Gregor 1854c53cca105ed595e12fecf04e415c3712bda936Douglas Gregortemplate<int, int, int> struct int_values { 1954c53cca105ed595e12fecf04e415c3712bda936Douglas Gregor static const unsigned value = 0; 2054c53cca105ed595e12fecf04e415c3712bda936Douglas Gregor}; 2154c53cca105ed595e12fecf04e415c3712bda936Douglas Gregor 2254c53cca105ed595e12fecf04e415c3712bda936Douglas Gregortemplate<unsigned char C1, unsigned char C3> 2354c53cca105ed595e12fecf04e415c3712bda936Douglas Gregorstruct int_values<C1, 12, C3> { 2454c53cca105ed595e12fecf04e415c3712bda936Douglas Gregor static const unsigned value = 1; 2554c53cca105ed595e12fecf04e415c3712bda936Douglas Gregor}; 2654c53cca105ed595e12fecf04e415c3712bda936Douglas Gregor 2754c53cca105ed595e12fecf04e415c3712bda936Douglas Gregorint check2[int_values<256, 12, 3>::value == 0? 1 : -1]; 28