Skip to content

Commit

Permalink
avoid self-move in requires clause
Browse files Browse the repository at this point in the history
  • Loading branch information
dietmarkuehl committed Jan 17, 2025
1 parent 28a8413 commit 2a12383
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/beman/lazy/poly.test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,8 @@ void test_poly_ctor() {
template <bool Expect, typename Base>
void test_poly_move_exists() {
static_assert(Expect == requires(ex::detail::poly<Base> p) { ex::detail::poly<Base>(std::move(p)); });
static_assert(Expect == requires(ex::detail::poly<Base> p) {
{ p = std::move(p) } -> std::same_as<ex::detail::poly<Base>&>;
static_assert(Expect == requires(ex::detail::poly<Base> p, ex::detail::poly<Base> q) {
{ q = std::move(p) } -> std::same_as<ex::detail::poly<Base>&>;
});
}
template <typename Base>
Expand Down

0 comments on commit 2a12383

Please sign in to comment.