//===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14, c++17 // template // requires sentinel_for, iterator_t>> // friend constexpr bool operator==(const iterator& x, const sentinel& y); #include #include #include #include "../types.h" #include "test_range.h" template struct Iter { std::tuple* it_; using value_type = std::tuple; using difference_type = std::intptr_t; using iterator_concept = std::input_iterator_tag; constexpr decltype(auto) operator*() const { return *it_; } constexpr Iter& operator++() { ++it_; return *this; } constexpr void operator++(int) { ++it_; } }; template struct Sent { std::tuple* end_; constexpr bool operator==(const Iter& i) const { return i.it_ == end_; } }; template struct CrossComparableSent { std::tuple* end_; template constexpr bool operator==(const Iter& i) const { return i.it_ == end_; } }; template