1 // { dg-do run { target c++26 } }
5 #include <testsuite_hooks.h>
10 int arr
[4]{0, 1, 2, 3};
11 std::span
<int> s(arr
);
15 s
.at(4); // { dg-warning "ignoring return value" "" { target exceptions_enabled } }
17 } catch (const std::out_of_range
&) {
21 auto s2
= s
.subspan(1, 2);
22 VERIFY(s2
.at(0) == 1);
23 VERIFY(s2
.at(1) == 2);
26 s2
.at(2); // { dg-warning "ignoring return value" "" { target exceptions_enabled } }
28 } catch (const std::out_of_range
&) {