| Issue |
83461
|
| Summary |
[clang][rejects valid][c++20] bad parse of constrained friend function
|
| Labels |
clang
|
| Assignees |
|
| Reporter |
ericniebler
|
The following should compile (-std=c++20):
```c++
template <class A>
concept always_true = true;
struct receiver {
template <class Tag = int>
friend void tag_invoke( always_true auto, receiver self) {
}
};
```
All recent versions of clang including trunk rejects this code with:
```
<source>:9:43: error: template parameter missing a default argument
9 | friend void tag_invoke( always_true auto, receiver self) {
| ^
<source>:8:25: note: previous default template argument defined here
8 | template <class Tag = int>
| ^
1 error generated.
Compiler returned: 1
```
https://godbolt.org/z/6G1hPsKM3
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs