| Issue |
162605
|
| Summary |
[libc++] deque::prepend_range rejects some valid code
|
| Labels |
libc++,
rejects-valid
|
| Assignees |
|
| Reporter |
philnik777
|
```c++
struct InPlaceOnly {
constexpr InPlaceOnly() {}
InPlaceOnly(const InPlaceOnly&) = delete;
InPlaceOnly(InPlaceOnly&&) = delete;
InPlaceOnly& operator=(const InPlaceOnly&) = delete;
InPlaceOnly& operator=(InPlaceOnly&&) = delete;
};
struct EmplaceConstructible {
EmplaceConstructible(const EmplaceConstructible&) = delete;
EmplaceConstructible& operator=(const EmplaceConstructible&) = delete;
EmplaceConstructible& operator=(EmplaceConstructible&&) = delete;
EmplaceConstructible(EmplaceConstructible&&) = delete;
constexpr EmplaceConstructible(const InPlaceOnly&) {}
};
template <template <class...> class Container>
constexpr void test_sequence_prepend_range_emplace_constructible() {
InPlaceOnly input[5];
types::for_each(types::cpp20_input_iterator_list<InPlaceOnly*>{}, [&]<class Iter> {
std::ranges::subrange in(Iter(input), sentinel_wrapper<Iter>(Iter(input + 5)));
Container<EmplaceConstructible> c;
c.prepend_range(in);
});
}
```
This code is correct, but currently rejected by our `deque::prepend_range` implementation.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs