summaryrefslogtreecommitdiff
path: root/test/CXX/temp/temp.decls/temp.class.spec/temp.class.order/p2.cpp
blob: cfa14f996bbe5660959775edb8e9709285387a40 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// RUN: %clang_cc1 -fsyntax-only -verify %s
template<int I, int J, class T> class X { 
  static const int value = 0;
};

template<int I, int J> class X<I, J, int> { 
  static const int value = 1;
};

template<int I> class X<I, I, int> { 
  static const int value = 2;
};

int array0[X<0, 0, float>::value == 0? 1 : -1];
int array1[X<0, 1, int>::value == 1? 1 : -1];
int array2[X<0, 0, int>::value == 2? 1 : -1];