[Bug c++/25663] New: [4.1/4.2 Regression] Parses operator() call as declarator

rguenth at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Wed Jan 4 09:14:00 GMT 2006


The following is rejected now as of a change between r109062 and r109079
with "error: invalid declarator" on the 2nd last line.

template <class T>
struct ScalarCode
{
 ScalarCode(const T&);
 template <class A, class B>
 void operator()(const A&, const B&);
};
template <int Dim>
struct CflFunctor
{
 CflFunctor(bool omrot, bool vis_f);
};
struct Bar {};
void foo(bool omrot, bool vis_f, const Bar& x, const Bar& y)
{
 ScalarCode<CflFunctor<3> >(CflFunctor<3>(omrot, vis_f))(x, y);
}


-- 
           Summary: [4.1/4.2 Regression] Parses operator() call as
                    declarator
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Keywords: rejects-valid
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: rguenth at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25663




More information about the Gcc-bugs mailing list