File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
libcxx/test/libcxx/containers/views/views.span Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change 1414
1515#include < array>
1616#include < span>
17- #include < vector>
1817
1918#include " test_macros.h"
2019
2120void test () {
2221 { // Test with a static extent
23- std::array< int , 2 > arr{94 , 82 };
22+ std::array arr{94 , 82 };
2423 std::span<int , 2 > sp{arr};
2524
2625 sp.first <1 >(); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}}
@@ -49,8 +48,7 @@ void test() {
4948 std::as_writable_bytes (sp);
5049 }
5150 { // Test with a dynamic extent
52- std::vector vec{94 , 82 };
53- std::span<int > sp{vec};
51+ std::span<int > sp;
5452
5553 sp.first <1 >(); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}}
5654 sp.last <1 >(); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}}
You can’t perform that action at this time.
0 commit comments