[Bug c++/40740] New: [4.4/4.5 regression] template-id forgotten with arg-dep lookup

jason at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Tue Jul 14 08:26:00 GMT 2009


>From https://bugzilla.redhat.com/show_bug.cgi?id=511168:

template<class T>
T addsome(T v) {
  return v+1;
}

int addsome(int v) {
  return v+2;
}

int main() {
  int i = 0;
  if (addsome(i) != 2)
    return 1;
  if (addsome<>(i) != 1)
    return 2;
  return 0;
}

Broken by fix for PR 13549.


-- 
           Summary: [4.4/4.5 regression] template-id forgotten with arg-dep
                    lookup
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: jason at gcc dot gnu dot org
        ReportedBy: jason at gcc dot gnu dot org


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



More information about the Gcc-bugs mailing list