1a343430eSDouglas Gregor // RUN: %clang_cc1 -fsyntax-only -verify %s 2*c6e68daaSAndy Gibbs // expected-no-diagnostics 3a343430eSDouglas Gregor 4a343430eSDouglas Gregor // Template type parameters. 5a343430eSDouglas Gregor typedef unsigned char T; 6a343430eSDouglas Gregor template<typename T = T> struct X0 { }; 7a343430eSDouglas Gregor template<> struct X0<unsigned char> { static const bool value = true; }; 8a343430eSDouglas Gregor int array0[X0<>::value? 1 : -1]; 9a343430eSDouglas Gregor 10a343430eSDouglas Gregor // Non-type template parameters. 11a343430eSDouglas Gregor const int N = 17; 12a343430eSDouglas Gregor template<int N = N> struct X1 { }; 13a343430eSDouglas Gregor template<> struct X1<17> { static const bool value = true; }; 14a343430eSDouglas Gregor int array1[X1<>::value? 1 : -1]; 15a343430eSDouglas Gregor 16a343430eSDouglas Gregor // Template template parameters. 17a343430eSDouglas Gregor template<template<class> class X0 = X0> struct X2 { }; 18a343430eSDouglas Gregor template<> struct X2<X0> { static const bool value = true; }; 19a343430eSDouglas Gregor int array2[X2<>::value? 1 : -1]; 20