We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e4e3d97 commit f63f6a0Copy full SHA for f63f6a0
libcxx/test/libcxx/ranges/range.adaptors/range.concat/iterator.valueless_by_exception.pass.cpp
@@ -237,4 +237,26 @@ int main() {
237
"valueless by exception");
238
}
239
240
+
241
+ {
242
+ //valueless by exception test constructor
243
+ flag = false;
244
+ Range<0> r1;
245
+ Range<1> r2;
246
247
+ auto cv = std::views::concat(r1, r2);
248
+ auto iter1 = cv.begin();
249
+ auto iter2 = std::ranges::next(cv.begin(), 4);
250
+ flag = true;
251
+ try {
252
+ iter1 = std::move(iter2);
253
+ } catch (...) {
254
+ TEST_LIBCPP_ASSERT_FAILURE(
255
+ [&] {
256
+ std::ranges::iterator_t<const decltype(cv)> it3(iter1);
257
+ (void)it3;
258
+ }(),
259
+ "valueless by exception");
260
+ }
261
262
0 commit comments