diff options
Diffstat (limited to 'test/std/containers/sequences/array/empty.fail.cpp')
-rw-r--r-- | test/std/containers/sequences/array/empty.fail.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/test/std/containers/sequences/array/empty.fail.cpp b/test/std/containers/sequences/array/empty.fail.cpp index 85bf5a7c9dab7..fe118c5f19b5b 100644 --- a/test/std/containers/sequences/array/empty.fail.cpp +++ b/test/std/containers/sequences/array/empty.fail.cpp @@ -23,6 +23,9 @@ int main () { + std::array<int, 1> c; - c.empty(); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} + c.empty(); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} + std::array<int, 0> c0; + c0.empty(); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} } |