OSDN Git Service

2001-02-26 Jeffrey Oldham <oldham@codesourcery.com>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.old-deja / g++.pt / static10.C
1 // Build don't link:
2 // crash test - XFAIL *-*-*
3 // regression test -
4
5 // by Paul Burchard <burchard@pobox.com>, Level Set Systems, Inc.
6 // Copyright (C) 1999 Free Software Foundation
7
8 template<class A>
9 struct X {
10         X(A) {
11         }
12 };
13 template<class A>
14 struct Y {
15         static X<A> x(A(1)); // ERROR - ANSI C++ forbids in-class initialization of non-const static member `x'
16 };
17 Y<int> y;
18