-
Notifications
You must be signed in to change notification settings - Fork 15.1k
Closed
Labels
libc++libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.rangesIssues related to `<ranges>`Issues related to `<ranges>`
Description
#include <iostream>
#include <ranges>
#include <vector>
int main()
{
const std::array<std::vector<int>, 2> v;
const auto jv = std::ranges::join_view(v);
if (auto it = std::ranges::find(jv, 5); it != jv.end())
std::cout << std::distance(jv.begin(), it); // should not enter here
std::cout << 42 << std::endl;
}
// clang++-18 main.cpp --std=c++20 -stdlib=libc++ && ./a.out - # hangs or crash
// clang++-18 main.cpp --std=c++20 -stdlib=libstdc++ && ./a.out - # Ok with libstdc++ or gccCode compiled with latest clang 18.1.6 and libc++ hangs or crash with Segmentation fault.
Metadata
Metadata
Assignees
Labels
libc++libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.rangesIssues related to `<ranges>`Issues related to `<ranges>`