[LLVMbugs] [Bug 7056] New: Confusion by friend declaration of global template function

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed May 5 10:05:46 PDT 2010


           Summary: Confusion by friend declaration of global template
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: syntheticpp at gmx.net
                CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com

Found with Loki.

Disable definition in /include/loki/SmartPtr.h line 54:

Build test/SmartPtr/main.cpp

main.cpp:1326:5: error: call to 'Release' is ambiguous
    Release( w1, pNull );
In file included from main.cpp:18:                                              
../../include/loki/SmartPtr.h:1386:21: note: candidate function
      [with $0 = BaseClass, OP1 = RefCounted, $2 = Loki::DisallowConversion,
KP1 = AssertCheck, SP1 = DefaultSPStorage, CNP1 = DontPropagateConst]
        friend void Release(SmartPtr<T1, OP1, CP1, KP1, SP1, CNP1>& sp,
../../include/loki/SmartPtr.h:1586:17: note: candidate function [with T =
BaseClass, OP = RefCounted, CP = Loki::DisallowConversion, KP = AssertCheck, SP
= DefaultSPStorage, CNP = DontPropagateConst]    
    inline void Release(SmartPtr<T, OP, CP, KP, SP, CNP>& sp,

The first declaration is only a friend declaration.

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