blob: 96eab006c32704ba8615f18fa4347293d62ac137 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
// PR c++/120684
// { dg-do compile { target c++20 } }
struct basic_string {
constexpr ~basic_string() {}
};
template <typename _Vp> struct lazy_split_view {
_Vp _M_base;
constexpr int* begin() { return nullptr; }
constexpr int* end() { return nullptr; }
};
constexpr void test_with_piping() {
basic_string input;
for (auto e : lazy_split_view(input))
;
}
constexpr bool main_test() {
test_with_piping();
test_with_piping();
return true;
}
//int main() { main_test(); }
static_assert(main_test());
|