// RUN: %clang_cc1 -std=c++98 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors // RUN: %clang_cc1 -std=c++11 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors // expected-no-diagnostics namespace dr408 { // dr408: 3.4 template void g() { int arr[N != 1 ? 1 : -1]; } template<> void g<2>() { } template struct S { static int i[]; void f(); }; template int S::i[] = { 1 }; template void S::f() { g(); } template<> int S::i[] = { 1, 2 }; template void S::f(); // uses g<2>(), not g<1>(). template struct R { static int arr[]; void f(); }; template int R::arr[1]; template void R::f() { int arr[sizeof(arr) != sizeof(int) ? 1 : -1]; } template<> int R::arr[2]; template void R::f(); }