[clang][rejects valid][c++20] bad parse of constrained friend function (original) (raw)
The following should compile (-std=c++20):
template concept always_true = true;
struct receiver { template 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