Skip to content

Commit

Permalink
Merge pull request #1715 from ericniebler/constraint-recursion
Browse files Browse the repository at this point in the history
avoid constraint recursion with ranges::any ctor/assign
  • Loading branch information
ericniebler committed Jun 23, 2022
2 parents caa49dd + 64fe7d7 commit 146a5ed
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/range/v3/utility/any.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)))
{}
Expand All @@ -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);
Expand Down

0 comments on commit 146a5ed

Please sign in to comment.