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: libcpp-has-no-incomplete-ranges
12 
13 // template<class R>
14 // drop_view(R&&, range_difference_t<R>) -> drop_view<views::all_t<R>>;
15 
16 #include <ranges>
17 
18 #include "test_macros.h"
19 #include "types.h"
20 
21 namespace ranges = std::ranges;
22 
23 static_assert(std::same_as<decltype(ranges::drop_view(ContiguousView(), 0)), ranges::drop_view<ContiguousView>>);
24 static_assert(std::same_as<decltype(ranges::drop_view(CopyableView(), 0)), ranges::drop_view<CopyableView>>);
25 static_assert(std::same_as<decltype(ranges::drop_view(ForwardView(), 0)), ranges::drop_view<ForwardView>>);
26 static_assert(std::same_as<decltype(ranges::drop_view(InputView(), 0)), ranges::drop_view<InputView>>);
27 
28 static_assert(std::same_as<decltype(ranges::drop_view(std::declval<ForwardRange&>(), 0)),
29                            ranges::drop_view<ranges::ref_view<ForwardRange>>>);
30 
31 static_assert(std::same_as<decltype(ranges::drop_view(BorrowableRange(), 0)),
32                            ranges::drop_view<ranges::subrange<int*>>>);
33