blob: a5b55b35d75241d6d3d27097a747c84bcd97a24c [file] [log] [blame]
Douglas Gregord94546a2009-05-20 21:38:11 +00001// RUN: clang-cc -fsyntax-only -verify %s
2
3// ---------------------------------------------------------------------
4// C++ Functional Casts
5// ---------------------------------------------------------------------
6template<int N>
7struct ValueInit0 {
8 int f() {
9 return int();
10 }
11};
12
13template struct ValueInit0<5>;
14
15template<int N>
16struct FunctionalCast0 {
17 int f() {
18 return int(N);
19 }
20};
21
22template struct FunctionalCast0<5>;
23
24struct X {
25 X(int, int);
26};
27
28template<int N, int M>
29struct BuildTemporary0 {
30 X f() {
31 return X(N, M);
32 }
33};
34
35template struct BuildTemporary0<5, 7>;