Merge from mainline (167278:168000).
[official-gcc/graphite-test-results.git] / gcc / testsuite / g++.dg / template / defarg6.C
blobf4d84685abe68352def3bc76930569675c523422
1 // Copyright (C) 2005 Free Software Foundation, Inc.
2 // Contributed by Nathan Sidwell 14 Oct 2005 <nathan@codesourcery.com>
4 // PR 21353 missing error.
5 // Origin:Andrew Pinski <pinskia@gcc.gnu.org>
7 enum X{ a, b, c };
9 struct C
11   static void func (X &ref = a); // { dg-error "default argument" "" }
14 template <typename T>
15 struct D
17   static void func (X &ref = a); // not an error at this point
20 void Foo (X & obj)
22   D<int>::func (obj);
24   D<int>::func (); // { dg-error "default argument" "" }