Skip to content

Commit

Permalink
Remove declval constructs
Browse files Browse the repository at this point in the history
  • Loading branch information
miscco committed Oct 23, 2020
1 parent 6626d2c commit 6a25360
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/std/tests/P0896R4_views_drop_while/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,9 @@ constexpr bool test_one(Rng&& rng, Expected&& expected) {
STATIC_ASSERT(same_as<decltype(move(rng) | pipeline), pipeline_t<remove_reference_t<Rng>>>);
STATIC_ASSERT(noexcept(move(rng) | pipeline) == is_noexcept);
} else if constexpr (enable_borrowed_range<remove_cvref_t<Rng>>) {
using S = decltype(ranges::subrange{declval<remove_reference_t<Rng>>()});
using S = decltype(ranges::subrange{move(rng)});
using RS = drop_while_view<S, Pred>;
constexpr bool is_noexcept = noexcept(S{declval<remove_reference_t<Rng>>()});
constexpr bool is_noexcept = noexcept(S{move(rng)});

STATIC_ASSERT(same_as<decltype(views::drop_while(move(rng), is_less_than_three)), RS>);
STATIC_ASSERT(noexcept(views::drop_while(move(rng), is_less_than_three)) == is_noexcept);
Expand All @@ -135,9 +135,9 @@ constexpr bool test_one(Rng&& rng, Expected&& expected) {
STATIC_ASSERT(same_as<decltype(move(as_const(rng)) | pipeline), pipeline_t<const remove_reference_t<Rng>>>);
STATIC_ASSERT(noexcept(move(as_const(rng)) | pipeline) == is_noexcept);
} else if constexpr (!is_view && enable_borrowed_range<remove_cvref_t<Rng>>) {
using S = decltype(ranges::subrange{declval<const remove_reference_t<Rng>>()});
using S = decltype(ranges::subrange{move(as_const(rng)});
using RS = drop_while_view<S, Pred>;
constexpr bool is_noexcept = noexcept(S{declval<const remove_reference_t<Rng>>()});
constexpr bool is_noexcept = noexcept(S{move(as_const(rng)});

STATIC_ASSERT(same_as<decltype(views::drop_while(move(as_const(rng)), is_less_than_three)), RS>);
STATIC_ASSERT(noexcept(views::drop_while(move(as_const(rng)), is_less_than_three)) == is_noexcept);
Expand Down

0 comments on commit 6a25360

Please sign in to comment.