diff options
author | Marshall Clow <mclow.lists@gmail.com> | 2017-11-15 20:02:27 +0000 |
---|---|---|
committer | Marshall Clow <mclow.lists@gmail.com> | 2017-11-15 20:02:27 +0000 |
commit | 25a7ba4524219e7eeb1254db0d406448f3703d3a (patch) | |
tree | 7dcad66bfed31f43ebef9bd15e925e95acfa7a58 /libcxx/test/std/strings/basic.string/string.capacity/empty.pass.cpp | |
parent | 118a7a99860b5079509a9452b9052053a295f5d7 (diff) | |
download | bcm5719-llvm-25a7ba4524219e7eeb1254db0d406448f3703d3a.tar.gz bcm5719-llvm-25a7ba4524219e7eeb1254db0d406448f3703d3a.zip |
More of P0600 - '[[nodiscard]] in the Library' mark empty() as nodiscard in string, string_view, and the free function std::empty(). Removed tabs from <string_view>, which is why the diff is so big.
llvm-svn: 318328
Diffstat (limited to 'libcxx/test/std/strings/basic.string/string.capacity/empty.pass.cpp')
-rw-r--r-- | libcxx/test/std/strings/basic.string/string.capacity/empty.pass.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libcxx/test/std/strings/basic.string/string.capacity/empty.pass.cpp b/libcxx/test/std/strings/basic.string/string.capacity/empty.pass.cpp index fbed5c36c3f..a61a410a444 100644 --- a/libcxx/test/std/strings/basic.string/string.capacity/empty.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.capacity/empty.pass.cpp @@ -9,17 +9,19 @@ // <string> -// bool empty() const; +// bool empty() const noexcept; #include <string> #include <cassert> +#include "test_macros.h" #include "min_allocator.h" template <class S> void test(const S& s) { + ASSERT_NOEXCEPT(s.empty()); assert(s.empty() == (s.size() == 0)); } |