[libcxx-commits] [libcxx] [libc++] LWG2899: Constrain move special functions of `tuple` and `unique_ptr` (PR #167211)
Nikolas Klauser via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Nov 10 03:18:08 PST 2025
================
@@ -208,9 +209,14 @@ class _LIBCPP_UNIQUE_PTR_TRIVIAL_ABI unique_ptr {
template <bool _Dummy = true, class = _EnableIfDeleterConstructible<_BadRValRefType<_Dummy> > >
_LIBCPP_HIDE_FROM_ABI unique_ptr(pointer __p, _BadRValRefType<_Dummy> __d) = delete;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unique_ptr(unique_ptr&& __u) _NOEXCEPT
- : __ptr_(__u.release()),
- __deleter_(std::forward<deleter_type>(__u.get_deleter())) {}
+#if _LIBCPP_STD_VER >= 20
----------------
philnik777 wrote:
If we don't have to we really should avoid different implementations for different standard versions. It makes readability strictly worse and doesn't improve anything else much AFAIK, much less outweigh the readability decrease.
https://github.com/llvm/llvm-project/pull/167211
More information about the libcxx-commits
mailing list