[llvm-bugs] [Bug 51936] New: template parameter with default argument is used without being verified during explicit specialization

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Sep 22 05:17:36 PDT 2021


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

            Bug ID: 51936
           Summary: template parameter with default argument is used
                    without being verified during explicit specialization
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: nickhuang99 at hotmail.com
                CC: blitzrakete at gmail.com, dgregor at apple.com,
                    erik.pilkington at gmail.com, llvm-bugs at lists.llvm.org,
                    richard-llvm at metafoo.co.uk

The following snippet code should be rejected because "First" should be checked
with its default argument which is "char"

template<class T,class First=char>
void foo(First,T){}
template<>
void foo<double>(int,double){}

-- 
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/20210922/5f9b9d67/attachment-0001.html>


More information about the llvm-bugs mailing list