Skip to content

Commit

Permalink
[test] Silence some GCC warnings-as-errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Quuxplusone committed Oct 18, 2023
1 parent 5336b5b commit 574497c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions test/hive_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1976,6 +1976,8 @@ TYPED_TEST(hivet, MoveOnlyInputIterator)
using Hive = TypeParam;
using Value = typename Hive::value_type;

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-local-typedefs"
struct MoveOnlyInputIterator {
using value_type = Value;
using difference_type = signed char;
Expand All @@ -1990,11 +1992,10 @@ TYPED_TEST(hivet, MoveOnlyInputIterator)
auto& operator++() { ++p_; return *this; }
void operator++(int) { ++p_; }
bool operator==(const MoveOnlyInputIterator& rhs) const { return p_ == rhs.p_; }
bool operator==(const Value *p) const { return p_ == p; }
#if __cplusplus < 202002L
bool operator!=(const MoveOnlyInputIterator& rhs) const { return p_ != rhs.p_; }
#endif
bool operator==(const Value *p) const { return p_ == p; }
};
#pragma GCC diagnostic pop

static_assert(std::is_move_constructible<MoveOnlyInputIterator>::value);
static_assert(!std::is_copy_constructible<MoveOnlyInputIterator>::value);
Expand Down

0 comments on commit 574497c

Please sign in to comment.