[LLVMbugs] [Bug 7419] New: Fail to recognize that return types match through two typedefs

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sat Jun 19 05:03:42 CDT 2010


http://llvm.org/bugs/show_bug.cgi?id=7419

           Summary: Fail to recognize that return types match through two
                    typedefs
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: chandlerc at gmail.com
                CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com


% cat t.cc              
template <typename T> struct S {
  typedef typename T::Y T2;
  typedef typename T2::Z T3;
  T3 f();
};

template <typename T> typename T::Y::Z S<T>::f() { }

% clang -fsyntax-only t.cc
t.cc:7:46: error: functions that differ only in their return type cannot be
overloaded
template <typename T> typename T::Y::Z S<T>::f() { }
                                             ^
t.cc:4:6: note: previous declaration is here
  T3 f();
     ^
1 error generated.

Note that T2 and T::Y on the declaration and definition respectively works
fine.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


More information about the LLVMbugs mailing list