Skip to content

Commit 0b01b42

Browse files
committed
Cleanup
1 parent de00bf4 commit 0b01b42

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

libcxx/test/libcxx/containers/views/views.span/nodiscard.verify.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,12 @@
1414

1515
#include <array>
1616
#include <span>
17-
#include <vector>
1817

1918
#include "test_macros.h"
2019

2120
void 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}}

0 commit comments

Comments
 (0)