[libcxx-commits] [PATCH] D143791: [libc++] Fix bug in allocate_shared_for_overwrite

Nikolas Klauser via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Feb 13 15:42:48 PST 2023


philnik added inline comments.


================
Comment at: libcxx/include/__memory/shared_ptr.h:299
     void __on_zero_shared() _NOEXCEPT override {
 #if _LIBCPP_STD_VER > 17
+        if constexpr (is_same_v<typename _Alloc::value_type, __for_overwrite_tag>) {
----------------
tcanens wrote:
> Might want to make this consistent one way or the other instead of `>= 20` in the ctor but `> 17` here.
We decided to use `>=` for new code and didn't update the code base to reflect that change yet. Before it was just inconsistent.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D143791/new/

https://reviews.llvm.org/D143791



More information about the libcxx-commits mailing list