summaryrefslogtreecommitdiff
path: root/test/std/containers/sequences/array/empty.fail.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2018-07-28 11:07:56 +0000
committerDimitry Andric <dim@FreeBSD.org>2018-07-28 11:07:56 +0000
commitf36202620b428c45a1c8d91743727c9313424fb2 (patch)
tree14928d8970ba4890a6370aca4c38fc832d45f21f /test/std/containers/sequences/array/empty.fail.cpp
parent0294ba5648d889e48ffee8ddad25944e258940ae (diff)
Notes
Diffstat (limited to 'test/std/containers/sequences/array/empty.fail.cpp')
-rw-r--r--test/std/containers/sequences/array/empty.fail.cpp5
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}}
}