void-packages/srcpkgs/range-v3/patches/1715.patch

32 lines
1.2 KiB
Diff

From 64fe7d738bb2c2aa8e9ba24d170a8548519156a7 Mon Sep 17 00:00:00 2001
From: Eric Niebler <eniebler@nvidia.com>
Date: Wed, 22 Jun 2022 17:06:16 -0700
Subject: [PATCH] avoid constraint recursion with ranges::any ctor/assign
---
include/range/v3/utility/any.hpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/range/v3/utility/any.hpp b/include/range/v3/utility/any.hpp
index 0d2889264..5feb2f8cd 100644
--- a/include/range/v3/utility/any.hpp
+++ b/include/range/v3/utility/any.hpp
@@ -123,7 +123,7 @@ namespace ranges
public:
any() noexcept = default;
template(typename TRef, typename T = detail::decay_t<TRef>)(
- requires copyable<T> AND (!same_as<T, any>)) //
+ requires (!same_as<T, any>) AND copyable<T>) //
any(TRef && t)
: ptr_(new impl<T>(static_cast<TRef &&>(t)))
{}
@@ -138,7 +138,7 @@ namespace ranges
return *this;
}
template(typename TRef, typename T = detail::decay_t<TRef>)(
- requires copyable<T> AND (!same_as<T, any>)) //
+ requires (!same_as<T, any>) AND copyable<T>) //
any & operator=(TRef && t)
{
any{static_cast<TRef &&>(t)}.swap(*this);