[libcxx-commits] [libcxx] 21d4050 - Mark shared_ptr::__create_with_control_block as noexcept.

via libcxx-commits libcxx-commits at lists.llvm.org
Tue May 19 17:17:42 PDT 2020


Author: zoecarver
Date: 2020-05-19T17:17:16-07:00
New Revision: 21d4050e2c999ed183a345a2dcd6792c9b71bf60

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

LOG: Mark shared_ptr::__create_with_control_block as noexcept.

Summary: The default constructor for shared_ptr and shared_ptr::__enable_weak_this are both noexcept so, shared_ptr::__create_with_control_block can also be marked noexcept.

Reviewers: ldionne, #libc!

Subscribers: dexonsmith, libcxx-commits

Tags: #libc

Differential Revision: https://reviews.llvm.org/D80070

Added: 
    

Modified: 
    libcxx/include/memory

Removed: 
    


################################################################################
diff  --git a/libcxx/include/memory b/libcxx/include/memory
index 49627147b061..af9230cff998 100644
--- a/libcxx/include/memory
+++ b/libcxx/include/memory
@@ -3954,7 +3954,7 @@ public:
 
     template<class _Yp, class _CntrlBlk>
     static shared_ptr<_Tp>
-    __create_with_control_block(_Yp* __p, _CntrlBlk* __cntrl)
+    __create_with_control_block(_Yp* __p, _CntrlBlk* __cntrl) _NOEXCEPT
     {
         shared_ptr<_Tp> __r;
         __r.__ptr_ = __p;


        


More information about the libcxx-commits mailing list