[libcxx-commits] [PATCH] D80070: Mark shared_ptr::__create_with_control_block as noexcept.

Zoe Carver via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sat May 16 15:22:01 PDT 2020


zoecarver created this revision.
zoecarver added a reviewer: ldionne.
Herald added subscribers: libcxx-commits, dexonsmith.
Herald added a project: libc++.
Herald added a reviewer: libc++.
zoecarver edited the summary of this revision.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D80070

Files:
  libcxx/include/memory


Index: libcxx/include/memory
===================================================================
--- libcxx/include/memory
+++ libcxx/include/memory
@@ -3954,7 +3954,7 @@
 
     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;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D80070.264456.patch
Type: text/x-patch
Size: 443 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20200516/bf7ddcca/attachment.bin>


More information about the libcxx-commits mailing list