[Bug c++/42034] 'type name' declared as function returning a function with operator()

2009-11-13 Thread pinskia 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

[Bug c++/42034] 'type name' declared as function returning a function with operator()

2009-11-13 Thread sc09q4 at bullseye dot com
--- Comment #2 from sc09q4 at bullseye dot com 2009-11-13 21:04 --- Let's look at these tokens T()(int()) in detail. (1) Yes T() looks like a function declarator: T()(int()) 111 (2) Then follows something in parenthesis, which looks a lot like C++03 direct-declarator rule #2,

[Bug c++/42034] 'type name' declared as function returning a function with operator()

2009-11-13 Thread pinskia at gcc dot gnu dot org
--- Comment #3 from pinskia at gcc dot gnu dot org 2009-11-13 21:07 --- *** This bug has been marked as a duplicate of 29234 *** -- pinskia at gcc dot gnu dot org changed: What|Removed |Added