| Issue |
242654
|
| Summary |
[libc++] `ranges::elements_of` compile failure due to missing module export
|
| Labels |
libc++
|
| Assignees |
|
| Reporter |
c8ef
|
```c++
// compile with -std=c++23 -stdlib=libc++ -fmodules -fcxx-modules -Xclang -fmodules-local-submodule-visibility
#include <ranges>
void test() {
int range[] = {1};
auto elements = std::ranges::elements_of(range);
auto allocator = elements.allocator;
}
```
https://godbolt.org/z/EzjqdWedK
```
<source>:6:10: error: definition of 'allocator' must be imported from module 'std.memory.allocator' before it is required
6 | auto allocator = elements.allocator;
| ^
/cefs/11/117707d19b8a1f0b137a7b22_clang-trunk-20261114/bin/../include/c++/v1/__memory/allocator.h:75:7: note: definition here is not reachable
75 | class allocator
| ^
1 error generated.
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs