* decl.c (make_typename_type): s/parameters/arguments/.
[official-gcc.git] / gcc / testsuite / g++.dg / cpp0x / constexpr-function3.C
blobea4f4abae3ba2fc592f42b3105f572afe488edf9
1 // { dg-do compile { target c++11 } }
3 // From N2235
5 // function template 1
6 template<typename T>
7   constexpr int bytesize(T t)
8   { return sizeof (t); }        // OK
10 char buf[bytesize(0)];          // OK -- not C99 VLA
13 // function template 2
14 template<typename _Tp>
15   constexpr _Tp
16   square(_Tp x) { return x; }
18 // Explicit specialization
19 template<>
20   constexpr unsigned long
21   square(unsigned long x) { return x * x; }
23 // Explicit instantiation
24 template int square(int);
26 class A { };
27 template A square(A);
29 template long square(long);