[LLVMbugs] [Bug 8517] New: return type not recognized in out of line definition

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sat Oct 30 14:17:22 PDT 2010


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

           Summary: return type not recognized in out of line definition
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: marc.glisse at normalesup.org
                CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com


The following code fails to compile with error:

m.C:10:12: error: functions that differ only in their return type cannot be
      overloaded
A < T > :: f ( ) 
           ^
m.C:5:11: note: previous declaration is here
Tmc_Point f ( ) ; 
          ^




template < class T > 
class A { 
typedef typename T :: Geom_traits Tmc_traits ; 
typedef typename T :: Point_3 Tmc_Point ; 
Tmc_Point f ( ) ; 
} ; 

template < class T > 
typename T :: Geom_traits :: Point_3 
A < T > :: f ( ) 
{ 
return Tmc_Point ( ) ; 
}

-- 
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 llvm-bugs mailing list