[llvm-bugs] [Bug 47521] New: error: no candidate function template was found for dependent friend function template specialization

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Sep 14 05:42:27 PDT 2020


https://bugs.llvm.org/show_bug.cgi?id=47521

            Bug ID: 47521
           Summary: error: no candidate function template was found for
                    dependent friend function template specialization
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++2a
          Assignee: unassignedclangbugs at nondot.org
          Reporter: tangyixuan at mail.dlut.edu.cn
                CC: blitzrakete at gmail.com, erik.pilkington at gmail.com,
                    llvm-bugs at lists.llvm.org, richard-llvm at metafoo.co.uk

Hi, the following code is accepted by gcc with -std=c++2a, while clang rejects
it.

$ cat s.cpp
namespace N {
        template < class A > class C {
                friend void f < A >();
        };
}

$ g++ -c -std=c++2a s.cpp
success

$ clang++ -c -std=c++2a s.cpp
s.cpp:3:22: error: no candidate function template was found for dependent
friend function template specialization
                friend void f < A >();
                            ^
1 error generated.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200914/e368be39/attachment.html>


More information about the llvm-bugs mailing list