aboutsummaryrefslogtreecommitdiff
path: root/libcxx/include/stack
diff options
context:
space:
mode:
authorMarshall Clow <mclow.lists@gmail.com>2017-11-15 05:51:26 +0000
committerMarshall Clow <mclow.lists@gmail.com>2017-11-15 05:51:26 +0000
commit72c8fad4270a9810e7868892910b8029e8a92b1c (patch)
treea74afdae3cd83274231149fa36dd5b33194bbda7 /libcxx/include/stack
parent260ad71dfee02ba2cc49541de8f70c9b897bb4a5 (diff)
downloadllvm-72c8fad4270a9810e7868892910b8029e8a92b1c.zip
llvm-72c8fad4270a9810e7868892910b8029e8a92b1c.tar.gz
llvm-72c8fad4270a9810e7868892910b8029e8a92b1c.tar.bz2
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/stack')
-rw-r--r--libcxx/include/stack2
1 files changed, 1 insertions, 1 deletions
diff --git a/libcxx/include/stack b/libcxx/include/stack
index b2d4e23..0cb4c6c 100644
--- a/libcxx/include/stack
+++ b/libcxx/include/stack
@@ -181,7 +181,7 @@ public:
: c(_VSTD::move(__s.c), __a) {}
#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();}