Issue 52900
Summary unpacking template argument pack into concept fails compiling
Labels new issue
Assignees
Reporter DNKpp
    The following code doesn't compile, due to pack expansions errors. (also see here https://godbolt.org/z/oo3fes58e)

```cpp
template <class T, class U = void>
concept food = true;

template <class... T>
void foo()
{
    food<T...>;
};

int main()
{
    foo<int>();
    foo<int, int>();
    return 0;
}```

```<source>: In function 'void foo()':
<source>:25:5: error: pack expansion argument for non-pack parameter 'T' of concept 'template<class T, class U> concept food'
   25 |     food<T...>;
      |     ^~~~~~~~~~
<source>:5:11: note: declared here
    5 | template <class T, class U = void>
      |           ^~~~~
Compiler returned: 1```
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to