Issue 165357
Summary Clang 21.1.3+ on arm64 fails to find 'enumerate' in ranges library
Labels clang
Assignees
Reporter maxishii
    Reproducer:

```cpp
#include <ranges>
int main()
{
    const int a[] = {1, 2, 4};
    for (auto [i, x] : std::views::enumerate(a))
    {;}
}
```

```
<source>:5:36: error: no member named 'enumerate' in namespace 'std::ranges::views'
    5 |     for (auto [i, x] : std::views::enumerate(a))
      | ^~~~~~~~~
1 error generated.
Compiler returned: 1
```

^ captured from armv8-a clang (trunk) at [compiler-explorer](https://compiler-explorer.com/z/Gq4G9jzhs).

The code compiles just fine with Clang 21.1.0 and with x86-64 trunk.

I encountered the same issue on my laptop with Clang 21.1.3.

```
@ /opt/homebrew/opt/llvm/bin/clang++ --version
Homebrew clang version 21.1.3
Target: arm64-apple-darwin22.6.0
Thread model: posix
InstalledDir: /opt/homebrew/Cellar/llvm/21.1.3_1/bin
Configuration file: /opt/homebrew/etc/clang/arm64-apple-darwin22.cfg
```

<img width="2138" height="721" alt="Image" src="" />
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to