[Bug c++/18803] New: [4.0 regression] rejects access to operator() in template
bangerth at dealii dot org
gcc-bugzilla@gcc.gnu.org
Thu Dec 2 23:42:00 GMT 2004
Here's a recent regression (within the last 6 weeks or so):
-----------------------
struct A {
int operator() ();
};
template <int> void foo () {
A &a = *new A();
const int i = a();
}
-----------------------
deal.II/lac> c++ -c x.cc
x.cc: In function 'void foo()':
x.cc:8: error: 'a' cannot be used as a function
That's clearly bogus. Of course the error goes away once the function
is made a nontemplate.
This error triggers about a dozen times in my code...
W.
--
Summary: [4.0 regression] rejects access to operator() in
template
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Keywords: rejects-valid
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: bangerth at dealii dot org
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18803
More information about the Gcc-bugs
mailing list