#include <ranges>
#include <cassert>
#include <concepts>
#include "test_macros.h"
#include "types.h"
template<class T, class U>
concept CanDeduce = requires(const T& t, const U& u) {
std::ranges::iota_view(t, u);
};
void test() {
static_assert(std::same_as<
decltype(std::ranges::iota_view(0, 0)),
std::ranges::iota_view<int, int>
>);
static_assert(std::same_as<
decltype(std::ranges::iota_view(0)),
std::ranges::iota_view<int, std::unreachable_sentinel_t>
>);
static_assert(std::same_as<
decltype(std::ranges::iota_view(0, std::unreachable_sentinel)),
std::ranges::iota_view<int, std::unreachable_sentinel_t>
>);
static_assert(std::same_as<
decltype(std::ranges::iota_view(0, IntComparableWith(0))),
std::ranges::iota_view<int, IntComparableWith<int>>
>);
static_assert( CanDeduce<int, int>);
static_assert(!CanDeduce<int, unsigned>);
static_assert(!CanDeduce<unsigned, int>);
}