More of P0600 - '[[nodiscard]] in the Library' mark empty() as nodiscard in match_results. <regex>

llvm-svn: 318375
Cr-Mirrored-From: sso://chromium.googlesource.com/_direct/external/github.com/llvm/llvm-project
Cr-Mirrored-Commit: 80ebbb17a129213118862f03372bd912b95276d8
diff --git a/include/regex b/include/regex
index 553d08d..ff84b27 100644
--- a/include/regex
+++ b/include/regex
@@ -5240,11 +5240,11 @@
 
     // size:
     _LIBCPP_INLINE_VISIBILITY
-    size_type size() const {return __matches_.size();}
+    size_type size() const _NOEXCEPT {return __matches_.size();}
     _LIBCPP_INLINE_VISIBILITY
-    size_type max_size() const {return __matches_.max_size();}
-    _LIBCPP_INLINE_VISIBILITY
-    bool empty() const {return size() == 0;}
+    size_type max_size() const _NOEXCEPT {return __matches_.max_size();}
+    _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+    bool empty() const _NOEXCEPT {return size() == 0;}
 
     // element access:
     _LIBCPP_INLINE_VISIBILITY