From 8c860ff5a4adaae675015193b9fed74707c201e0 Mon Sep 17 00:00:00 2001 From: gabrielaugz <95982237+gabrielaugz@users.noreply.github.com> Date: Tue, 25 Mar 2025 15:32:03 -0300 Subject: [PATCH 1/2] docs: remove comments for LWG-3210, LWG-4024, and LWG-4154 --- stl/inc/future | 4 ++-- stl/inc/memory | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/stl/inc/future b/stl/inc/future index 1f691f52444..135fa8fecdd 100644 --- a/stl/inc/future +++ b/stl/inc/future @@ -1210,7 +1210,7 @@ public: template , packaged_task>, int> = 0> explicit packaged_task(_Fty2&& _Fnarg) : _MyPromise(new _MyStateType(_STD forward<_Fty2>(_Fnarg))) { - static_assert(_Is_invocable_r<_Ret, decay_t<_Fty2>&, _ArgTypes...>::value, // per LWG-4154 + static_assert(_Is_invocable_r<_Ret, decay_t<_Fty2>&, _ArgTypes...>::value, "The function object must be callable with _ArgTypes... and return _Ret (N4988 [futures.task.members]/3)."); } @@ -1222,7 +1222,7 @@ public: template , packaged_task>, int> = 0> packaged_task(allocator_arg_t, const _Alloc& _Al, _Fty2&& _Fnarg) : _MyPromise(_STD _Make_packaged_state<_MyStateType>(_STD forward<_Fty2>(_Fnarg), _Al)) { - static_assert(_Is_invocable_r<_Ret, decay_t<_Fty2>&, _ArgTypes...>::value, // per LWG-4154 + static_assert(_Is_invocable_r<_Ret, decay_t<_Fty2>&, _ArgTypes...>::value, "The function object must be callable with _ArgTypes... and return _Ret (N4140 [futures.task.members]/2)."); } #endif // _HAS_FUNCTION_ALLOCATOR_SUPPORT diff --git a/stl/inc/memory b/stl/inc/memory index 883a16076f7..126904d0c51 100644 --- a/stl/inc/memory +++ b/stl/inc/memory @@ -3001,8 +3001,6 @@ template #endif // ^^^ !_HAS_CXX20 ^^^ _NODISCARD_SMART_PTR_ALLOC shared_ptr<_Ty> allocate_shared(const _Alloc& _Al, _Types&&... _Args) { // make a shared_ptr to non-array object - // Note: As of 2019-05-28, this implements the proposed resolution of LWG-3210 (which controls whether - // allocator::construct sees T or const T when _Ty is const qualified) using _Refoa = _Ref_count_obj_alloc3, _Alloc>; using _Alblock = _Rebind_alloc_t<_Alloc, _Refoa>; _Alblock _Rebound(_Al); From 19a1322ad093e311643e14a3feb037cc66c08bc9 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Tue, 25 Mar 2025 14:06:03 -0700 Subject: [PATCH 2/2] Remove LWG-4024 comments. --- stl/inc/memory | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/stl/inc/memory b/stl/inc/memory index 126904d0c51..8791b476763 100644 --- a/stl/inc/memory +++ b/stl/inc/memory @@ -2542,7 +2542,7 @@ private: } void _Destroy() noexcept override { // destroy managed resource - _STD _Destroy_in_place(_Storage._Value); // use the default mechanism per LWG-4024 + _STD _Destroy_in_place(_Storage._Value); } void _Delete_this() noexcept override { // destroy self @@ -2789,7 +2789,7 @@ private: } void _Destroy() noexcept override { // destroy managed resource - _STD _Reverse_destroy_multidimensional_n(_Get_ptr(), _Size); // use the default mechanism per LWG-4024 + _STD _Reverse_destroy_multidimensional_n(_Get_ptr(), _Size); } void _Delete_this() noexcept override { // destroy self @@ -2893,7 +2893,7 @@ private: void _Destroy() noexcept override { // destroy managed resource // not _Storage._Value as _Ty is an array type (not a class type or a scalar type), // and thus cannot be used as a pseudo-destructor (N4964 [expr.prim.id.dtor]). - _STD _Destroy_in_place(_Storage); // use the default mechanism per LWG-4024 + _STD _Destroy_in_place(_Storage); } void _Delete_this() noexcept override { // destroy self