//===----------------------------------------------------------------------===// // // 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 (!is-integer-like || !is-integer-like || // (is-signed-integer-like == is-signed-integer-like)) // iota_view(W, Bound) -> iota_view; #include #include #include #include "test_macros.h" #include "types.h" template 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 >); static_assert(std::same_as< decltype(std::ranges::iota_view(0)), std::ranges::iota_view >); static_assert(std::same_as< decltype(std::ranges::iota_view(0, std::unreachable_sentinel)), std::ranges::iota_view >); static_assert(std::same_as< decltype(std::ranges::iota_view(0, IntComparableWith(0))), std::ranges::iota_view> >); static_assert( CanDeduce); static_assert(!CanDeduce); static_assert(!CanDeduce); }