This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/42034] "'type name' declared as function returning a function" with operator()
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 Nov 2009 20:21:33 -0000
- Subject: [Bug c++/42034] "'type name' declared as function returning a function" with operator()
- References: <bug-42034-18434@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from pinskia at gcc dot gnu dot org 2009-11-13 20:21 -------
I don't think this is a bug. There is an ambiguous in the syntax in figuring
out if T() (int()) is a function declaration or a calling the operator() on a
newly created T. The C++ standard resolves it as being a function declaration
which is why you are getting an error.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42034