Debian Codegraph @

gcc/testsuite/g++.dg/template/operator5.C

raw
1 // Copyright (C) 2004 Free Software Foundation, Inc.
2 // Contributed by Nathan Sidwell 7 Dec 2004 <[email protected]>
3
4 // PR 18803: reject legal
5 // Origin: Wolfgang Bangerth <[email protected]>
6
7 struct A {
8 int operator() ();
9 };
10
11 template <int> void foo () {
12 A &a = *new A();
13 const int i = a();
14 }