[llvm-bugs] [Bug 51644] New: candidate template ignored: substitution failure [with U = float]: variable length array cannot be formed during template argument deduction

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Aug 27 02:31:48 PDT 2021


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

            Bug ID: 51644
           Summary: candidate template ignored: substitution failure [with
                    U = float]: variable length array cannot be formed
                    during template argument deduction
           Product: clang
           Version: 11.0
          Hardware: PC
                OS: FreeBSD
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++11
          Assignee: unassignedclangbugs at nondot.org
          Reporter: yuri at tsoft.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

Created attachment 25196
  --> https://bugs.llvm.org/attachment.cgi?id=25196&action=edit
c++test.cpp

The attached testcase fails:

c++test.cpp:16:12: error: no matching member function for call to 'mmm'
        return ph.mmm(data, 10);
               ~~~^~~
c++test.cpp:10:14: note: candidate template ignored: substitution failure [with
U = float]: variable length array cannot be formed during template argument
deduction
    inline U mmm(U data[(1U<<IntBits)+1], unsigned int mask) const {
             ^         ~
c++test.cpp:10:28: warning: shift count >= width of type
[-Wshift-count-overflow]
    inline U mmm(U data[(1U<<IntBits)+1], unsigned int mask) const {
                           ^ ~~~~~~~
1 warning and 1 error generated.
[yuri at yv /disk-samsung/freebsd-ports/audio/calf-lv2]$ c++ -std=c++11 -c
c++test.cpp 
c++test.cpp:16:12: error: no matching member function for call to 'mmm'
        return ph.mmm(data, 10);
               ~~~^~~
c++test.cpp:10:14: note: candidate template ignored: substitution failure [with
U = float]: variable length array cannot be formed during template argument
deduction
    inline U mmm(U data[(1U<<IntBits)+1], unsigned int mask) const {
             ^         ~
c++test.cpp:10:28: warning: shift count >= width of type
[-Wshift-count-overflow]
    inline U mmm(U data[(1U<<IntBits)+1], unsigned int mask) const {
                           ^ ~~~~~~~
1 warning and 1 error generated.


clang-11
FreeBSD 13

-- 
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/20210827/01589973/attachment.html>


More information about the llvm-bugs mailing list