diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2018-07-28 11:07:56 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2018-07-28 11:07:56 +0000 |
commit | f36202620b428c45a1c8d91743727c9313424fb2 (patch) | |
tree | 14928d8970ba4890a6370aca4c38fc832d45f21f /test/std/containers/sequences/array/empty.fail.cpp | |
parent | 0294ba5648d889e48ffee8ddad25944e258940ae (diff) |
Notes
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}} } |