summaryrefslogtreecommitdiff
blob: 00eb457b5dcbcb73fb8e6f922d62698338d51611 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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);