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: [email protected]
        ReportedBy: [email protected]
                CC: [email protected], [email protected]


% 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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to