Skip to content

Commit

Permalink
Update iterator.cc
Browse files Browse the repository at this point in the history
  • Loading branch information
lackhole committed Aug 29, 2024
1 parent 6a26c8b commit 919a1e3
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions test/iterator.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
#include "preview/iterator.h"
#include "gtest.h"

// TODO: Write test
TEST(VERSIONED(Iterator), basics) {}

template<class T>
struct Holder {
T t;
};

struct Incomplete;
using P = Holder<Incomplete>*;

TEST(VERSIONED(Iterator), projected) {
EXPECT_TRUE_TYPE(preview::equality_comparable<P>); // OK
EXPECT_TRUE_TYPE(preview::indirectly_comparable<P*, P*, std::equal_to<>>); // Error before C++26
EXPECT_TRUE_TYPE(preview::sortable<P*>); // Error before C++26
}

0 comments on commit 919a1e3

Please sign in to comment.