1 //===----------------------------------------------------------------------===// 2 // 3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4 // See https://llvm.org/LICENSE.txt for license information. 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 // 7 //===----------------------------------------------------------------------===// 8 9 // UNSUPPORTED: c++03, c++11, c++14, c++17 10 // UNSUPPORTED: libcpp-no-concepts 11 // UNSUPPORTED: gcc-10 12 // UNSUPPORTED: libcpp-has-no-incomplete-ranges 13 14 // template<class R> 15 // drop_view(R&&, range_difference_t<R>) -> drop_view<views::all_t<R>>; 16 17 #include <ranges> 18 19 #include "test_macros.h" 20 #include "types.h" 21 22 namespace ranges = std::ranges; 23 24 static_assert(std::same_as<decltype(ranges::drop_view(ContiguousView(), 0)), ranges::drop_view<ContiguousView>>); 25 static_assert(std::same_as<decltype(ranges::drop_view(CopyableView(), 0)), ranges::drop_view<CopyableView>>); 26 static_assert(std::same_as<decltype(ranges::drop_view(ForwardView(), 0)), ranges::drop_view<ForwardView>>); 27 static_assert(std::same_as<decltype(ranges::drop_view(InputView(), 0)), ranges::drop_view<InputView>>); 28 29 static_assert(std::same_as<decltype(ranges::drop_view(std::declval<ForwardRange&>(), 0)), 30 ranges::drop_view<ranges::ref_view<ForwardRange>>>); 31 32 static_assert(std::same_as<decltype(ranges::drop_view(BorrowableRange(), 0)), 33 ranges::drop_view<ranges::subrange<int*>>>); 34