[libcxx-commits] [libcxx] [libc++][NFC] Use `if constexpr` instead of SFINAE to simplify shared_ptr (PR #113495)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Oct 24 07:26:12 PDT 2024
================
@@ -252,45 +252,34 @@ template <class _Tp, class _Alloc>
struct __shared_ptr_emplace : __shared_weak_count {
using __value_type = __remove_cv_t<_Tp>;
- template <class... _Args,
- class _Allocator = _Alloc,
- __enable_if_t<is_same<typename _Allocator::value_type, __for_overwrite_tag>::value, int> = 0>
+ template <class... _Args>
_LIBCPP_HIDE_FROM_ABI explicit __shared_ptr_emplace(_Alloc __a, _Args&&...) : __storage_(std::move(__a)) {
----------------
ldionne wrote:
Thanks, I revived this patch from an old local branch I had and went a bit fast.
https://github.com/llvm/llvm-project/pull/113495
More information about the libcxx-commits
mailing list