Skip to content

Commit

Permalink
Uses ReferenceMatchesDeref in starmap test
Browse files Browse the repository at this point in the history
Issue #88
  • Loading branch information
ryanhaining committed Aug 18, 2022
1 parent e4fb185 commit d70c2b1
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions test/test_starmap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -201,18 +201,15 @@ TEST_CASE("starmap: iterator dereference type matches 'reference' type alias",
std::vector<std::pair<int, int>> input;
SECTION("with reference return type") {
auto sm = iter::starmap(larger_ref, input);
REQUIRE(
std::is_same_v<decltype(*sm.begin()), decltype(sm.begin())::reference>);
REQUIRE(itertest::ReferenceMatchesDeref<decltype(std::begin(sm))>::value);
}
SECTION("with const reference return type") {
auto sm = iter::starmap(larger_const_ref, input);
REQUIRE(
std::is_same_v<decltype(*sm.begin()), decltype(sm.begin())::reference>);
REQUIRE(itertest::ReferenceMatchesDeref<decltype(std::begin(sm))>::value);
}
SECTION("with value return type") {
auto sm = iter::starmap(larger, input);
REQUIRE(
std::is_same_v<decltype(*sm.begin()), decltype(sm.begin())::reference>);
REQUIRE(itertest::ReferenceMatchesDeref<decltype(std::begin(sm))>::value);
}
}

Expand Down

0 comments on commit d70c2b1

Please sign in to comment.