From 00ffe730072f5e2e1923692163dc37db7b3784cb Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Mon, 7 Sep 2020 20:09:17 +0100 Subject: [PATCH] libstdc++: Simplify constraints for semiregular-box [LWG 3477] libstdc++-v3/ChangeLog: * include/std/ranges (__box): Simplify constraints as per LWG 3477. --- libstdc++-v3/include/std/ranges | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libstdc++-v3/include/std/ranges b/libstdc++-v3/include/std/ranges index 054ffe85d0f..23a04d61174 100644 --- a/libstdc++-v3/include/std/ranges +++ b/libstdc++-v3/include/std/ranges @@ -494,10 +494,12 @@ namespace ranges using std::optional<_Tp>::operator=; + // _GLIBCXX_RESOLVE_LIB_DEFECTS + // 3477. Simplify constraints for semiregular-box __box& operator=(const __box& __that) noexcept(is_nothrow_copy_constructible_v<_Tp>) - requires (!assignable_from<_Tp&, const _Tp&>) + requires (!copyable<_Tp>) { if ((bool)__that) this->emplace(*__that); @@ -509,7 +511,7 @@ namespace ranges __box& operator=(__box&& __that) noexcept(is_nothrow_move_constructible_v<_Tp>) - requires (!assignable_from<_Tp&, _Tp>) + requires (!movable<_Tp>) { if ((bool)__that) this->emplace(std::move(*__that)); -- 2.30.2