cp/
[official-gcc.git] / gcc / testsuite / g++.dg / expr / call4.C
blobb4f2d60be7e59ed547463892131e6730ca3a7a8d
1 // { dg-do compile }
3 // Copyright (C) 2007 Free Software Foundation, Inc.
4 // Contributed by Nathan Sidwell 22 Jul 2007 <nathan@codesourcery.com>
6 // Origin: Danny Boelens <danny.boelens@artwork-systems.com>
7 // PR 32839.  Default arguments propagated through the type system to
8 // an indirect call.
10 template<typename T>
11 struct TPL
13   enum Whatever {e1, e2};
15   static void Quux (int i = e1 | e2);
18 template <typename F>
19 void DoIt (F fun)
21   fun (); // { dg-error "too few arguments" }
24 void Foo ()
26   DoIt (&TPL<int>::Quux);