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/queue | |
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/queue')
-rw-r--r-- | libcxx/include/queue | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libcxx/include/queue b/libcxx/include/queue index feaae892046..670fbb722ee 100644 --- a/libcxx/include/queue +++ b/libcxx/include/queue @@ -268,7 +268,7 @@ public: #endif // _LIBCPP_CXX03_LANG - _LIBCPP_INLINE_VISIBILITY + _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY bool empty() const {return c.empty();} _LIBCPP_INLINE_VISIBILITY size_type size() const {return c.size();} @@ -490,7 +490,7 @@ public: _Alloc>::value>::type* = 0); #endif // _LIBCPP_CXX03_LANG - _LIBCPP_INLINE_VISIBILITY + _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY bool empty() const {return c.empty();} _LIBCPP_INLINE_VISIBILITY size_type size() const {return c.size();} |