template<class T, class U>
auto f(T,U) -> decltype(T() + U())
{ return T() + U(); }

int main() { f(2,f,3.4); }

Compiled with -std=c++0x gives,

ICE: in arg_assoc_type, at cp/name-lookup.c:4738


-- 
           Summary: [c++0x] ICE when too many arguments given to auto return
                    type function
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: cfairles at gcc dot gnu dot org


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

Reply via email to