| Issue |
75915
|
| Summary |
Missing diagnostic; liftime of filter_view
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
TheHllm
|
[This](https://godbolt.org/z/dzK7vav6W) should give a warning
```c++
#include <vector>
#include <ranges>
int main(){
std::vector<int> vec = {1,2,3,4};
auto beg = (vec | std::views::filter([](int v){return true;})).begin();
beg++;
return *beg;
}
```
similar to the one you get when doing the [same](https://godbolt.org/z/rreWd8fbv) with a vector:
```c++
#include <vector>
int main(){
auto beg = (std::vector<int>{1,2,3}).begin();
beg++;
return *beg;
}
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs