[Clang] Array comparison isn't rejected in C++26 mode when the involved array type is dependent in a function template
Open
accepts-invalid
c++26
clang:frontend
diverges-from:gcc
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
The following program is ill-formed in C++26 (per [P2865R6](https://wg21.link/p2865r6)), but Clang currently fails to reject it even with option `-pedantic-errors`. [Godbolt link](https://godbolt.org/z/4Yns1Y8Y9).
```C++
int main() {
int a[1]{}, b[1]{};
[](const auto &x, const auto& y) {
return x == y;
}(a, b);
}
```
It seems that Clang only rejects array comparison when the array types are non-dependent currently.
Contributor guide
Assessment
This issue has not been assessed yet.