https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115358

            Bug ID: 115358
           Summary: template argument deduction/substitution failed on
                    lambda function
           Product: gcc
           Version: 13.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dongkyun.s at samsung dot com
  Target Milestone: ---

Hello

Noticed compilation failed with https://godbolt.org/z/8s78YPWs3 example code
starting from GCC-13.

<source>: In lambda function:
<source>:10:12: error: no matching function for call to 'foo(const char [])'
   10 |         foo(STR);
      |         ~~~^~~~~
<source>:2:6: note: candidate: 'template<int N> void foo(const char (&)[N])'
    2 | void foo(const char (&data)[N]) {}
      |      ^~~
<source>:2:6: note:   template argument deduction/substitution failed:
<source>:10:12: note:   mismatched types 'const char [N]' and 'const char []'
   10 |         foo(STR);
      |         ~~~^~~~~
ASM generation compiler returned: 1

Any idea into this failure ?
Thank you in advance !

Reply via email to