Sebastian Redl | 599fe7c | 2009-05-27 19:21:29 +0000 | [diff] [blame] | 1 | // RUN: clang-cc -fsyntax-only -verify %s |
2 | |||||
3 | enum Enum { val = 1 }; | ||||
4 | template <Enum v> struct C { | ||||
5 | typedef C<v> Self; | ||||
6 | }; | ||||
7 | template struct C<val>; | ||||
Douglas Gregor | 4912c34 | 2009-11-06 00:03:12 +0000 | [diff] [blame] | 8 | |
9 | template<typename T> | ||||
10 | struct get_size { | ||||
11 | static const unsigned value = sizeof(T); | ||||
12 | }; | ||||
13 | |||||
14 | template<typename T> | ||||
15 | struct X0 { | ||||
16 | enum { | ||||
17 | Val1 = get_size<T>::value, | ||||
18 | Val2, | ||||
19 | SumOfValues = Val1 + Val2 | ||||
20 | }; | ||||
21 | }; | ||||
22 | |||||
23 | X0<int> x0i; |