[libcxx-commits] [libcxx] 65d62e5 - [libc++][test] Replace a TEST_NOEXCEPT_FALSE with noexcept(false). NFC.

Joe Loser via libcxx-commits libcxx-commits at lists.llvm.org
Sun Oct 10 11:52:01 PDT 2021


Author: Joe Loser
Date: 2021-10-10T14:46:35-04:00
New Revision: 65d62e52a78940b2c332b32429fffe557860e8ed

URL: https://github.com/llvm/llvm-project/commit/65d62e52a78940b2c332b32429fffe557860e8ed
DIFF: https://github.com/llvm/llvm-project/commit/65d62e52a78940b2c332b32429fffe557860e8ed.diff

LOG: [libc++][test] Replace a TEST_NOEXCEPT_FALSE with noexcept(false). NFC.

Replace `TEST_NOEXCEPT_FALSE` directly with `noexcept(false)` in
optional hash test which is only run in C++17 or later.
`TEST_NOEXCEPT_FALSE` is only useful in C++03 context where `noexcept`
isn't supported by clang. `TEST_NOEXCEPT_FALSE` now only has one remaining use
in `hash_unique_ptr.pass.cpp`.

Added: 
    

Modified: 
    libcxx/test/std/utilities/optional/optional.hash/hash.pass.cpp

Removed: 
    


################################################################################
diff  --git a/libcxx/test/std/utilities/optional/optional.hash/hash.pass.cpp b/libcxx/test/std/utilities/optional/optional.hash/hash.pass.cpp
index 49e6bc4709826..bb8a319316cdb 100644
--- a/libcxx/test/std/utilities/optional/optional.hash/hash.pass.cpp
+++ b/libcxx/test/std/utilities/optional/optional.hash/hash.pass.cpp
@@ -27,7 +27,7 @@ namespace std {
 
 template <>
 struct hash<B> {
-  size_t operator()(B const&) TEST_NOEXCEPT_FALSE { return 0; }
+  size_t operator()(B const&) noexcept(false) { return 0; }
 };
 
 }


        


More information about the libcxx-commits mailing list