gcc/testsuite/g++.old-deja/g++.jason/const2.C
raw| 1 | // { dg-do run } |
| 2 | // Example of static member constants |
| 3 | |
| 4 | extern "C" int printf (const char *, ...); |
| 5 | |
| 6 | struct T { |
| 7 | static const char letter = 'a'; // this is the new stuff! |
| 8 | char x[letter]; |
| 9 | void f(); |
| 10 | }; |
| 11 | |
| 12 | void T::f() { printf ("%p", &letter); } |
| 13 | const char T::letter; // still need def after class |
| 14 | |
| 15 | int main() { } |