[libcxx-commits] [libcxx] b9ca1e5 - [libc++][NFC] Use noexcept instead of _NOEXCEPT for code compiled into the library

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Mon Apr 11 09:31:17 PDT 2022


Author: Louis Dionne
Date: 2022-04-11T12:30:38-04:00
New Revision: b9ca1e5a5a31a90afcecc02cd9555ed4ec9ff617

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

LOG: [libc++][NFC] Use noexcept instead of _NOEXCEPT for code compiled into the library

We build the library with C++20 anyways, so we can use noexcept directly.

Added: 
    

Modified: 
    libcxx/include/__memory/shared_ptr.h
    libcxx/include/system_error

Removed: 
    


################################################################################
diff  --git a/libcxx/include/__memory/shared_ptr.h b/libcxx/include/__memory/shared_ptr.h
index 397da8f8fa1cf..eb52f6ecbee7d 100644
--- a/libcxx/include/__memory/shared_ptr.h
+++ b/libcxx/include/__memory/shared_ptr.h
@@ -164,8 +164,8 @@ class _LIBCPP_TYPE_VIS __shared_count
 
 #if defined(_LIBCPP_BUILDING_LIBRARY) && \
     defined(_LIBCPP_DEPRECATED_ABI_LEGACY_LIBRARY_DEFINITIONS_FOR_INLINE_FUNCTIONS)
-    void __add_shared() _NOEXCEPT;
-    bool __release_shared() _NOEXCEPT;
+    void __add_shared() noexcept;
+    bool __release_shared() noexcept;
 #else
     _LIBCPP_INLINE_VISIBILITY
     void __add_shared() _NOEXCEPT {
@@ -202,9 +202,9 @@ class _LIBCPP_TYPE_VIS __shared_weak_count
 public:
 #if defined(_LIBCPP_BUILDING_LIBRARY) && \
     defined(_LIBCPP_DEPRECATED_ABI_LEGACY_LIBRARY_DEFINITIONS_FOR_INLINE_FUNCTIONS)
-    void __add_shared() _NOEXCEPT;
-    void __add_weak() _NOEXCEPT;
-    void __release_shared() _NOEXCEPT;
+    void __add_shared() noexcept;
+    void __add_weak() noexcept;
+    void __release_shared() noexcept;
 #else
     _LIBCPP_INLINE_VISIBILITY
     void __add_shared() _NOEXCEPT {

diff  --git a/libcxx/include/system_error b/libcxx/include/system_error
index feffa2debf4e0..27e44beffe3c1 100644
--- a/libcxx/include/system_error
+++ b/libcxx/include/system_error
@@ -204,7 +204,7 @@ public:
 
 #if defined(_LIBCPP_BUILDING_LIBRARY) && \
     defined(_LIBCPP_DEPRECATED_ABI_LEGACY_LIBRARY_DEFINITIONS_FOR_INLINE_FUNCTIONS)
-    error_category() _NOEXCEPT;
+    error_category() noexcept;
 #else
     _LIBCPP_INLINE_VISIBILITY
     _LIBCPP_CONSTEXPR_AFTER_CXX11 error_category() _NOEXCEPT = default;


        


More information about the libcxx-commits mailing list