OSDN Git Service

2010-02-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / template / sizeof1.C
1 // Test use of `sizeof' as a template parameter.
2 // Origin: smacdonald@seimac.com
3
4 // { dg-do compile }
5
6 template <unsigned I> struct A { static char *value; };
7
8 template <typename SizeType>
9 struct B
10 {
11 char * f() const
12 {
13 return (A<sizeof(void *)>::value);
14 }
15 };