diff options
| author | Marshall Clow <mclow.lists@gmail.com> | 2017-11-15 05:51:26 +0000 |
|---|---|---|
| committer | Marshall Clow <mclow.lists@gmail.com> | 2017-11-15 05:51:26 +0000 |
| commit | 72c8fad4270a9810e7868892910b8029e8a92b1c (patch) | |
| tree | a74afdae3cd83274231149fa36dd5b33194bbda7 /libcxx/include/array | |
| parent | 260ad71dfee02ba2cc49541de8f70c9b897bb4a5 (diff) | |
| download | bcm5719-llvm-72c8fad4270a9810e7868892910b8029e8a92b1c.tar.gz bcm5719-llvm-72c8fad4270a9810e7868892910b8029e8a92b1c.zip | |
First part of P0600 - '[[nodiscard] in the standard library'. Mark the 'empty()' methods of all the containers as nodiscard. If you're calling empty() w/o looking at the result, you probably meanto to call 'clear()'. c++2a only
llvm-svn: 318269
Diffstat (limited to 'libcxx/include/array')
| -rw-r--r-- | libcxx/include/array | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libcxx/include/array b/libcxx/include/array index 12780992e5c..4eb2fe6fc62 100644 --- a/libcxx/include/array +++ b/libcxx/include/array @@ -183,7 +183,7 @@ struct _LIBCPP_TEMPLATE_VIS array _LIBCPP_CONSTEXPR size_type size() const _NOEXCEPT {return _Size;} _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR size_type max_size() const _NOEXCEPT {return _Size;} - _LIBCPP_INLINE_VISIBILITY + _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR bool empty() const _NOEXCEPT {return _Size == 0;} // element access: |

