[llvm-bugs] [Bug 50950] New: [concepts] explicit specialization 'template<>' syntax permitted when declaring a terse function template

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Jun 30 13:20:03 PDT 2021


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

            Bug ID: 50950
           Summary: [concepts] explicit specialization 'template<>' syntax
                    permitted when declaring a terse function template
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++2a
          Assignee: unassignedclangbugs at nondot.org
          Reporter: richard-llvm at metafoo.co.uk
                CC: blitzrakete at gmail.com, erik.pilkington at gmail.com,
                    llvm-bugs at lists.llvm.org, richard-llvm at metafoo.co.uk

Clang incorrectly permits this syntax:

template<typename T> concept X = true;     
template<> void f(X auto x);

... treating the second line as the declaration of a function template. But
'template<>' always means an explicit specialization is being declared. We
should diagnose the 'template<>' in this case and suggest that it be removed.

-- 
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/20210630/6abf7599/attachment.html>


More information about the llvm-bugs mailing list