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-has-no-incomplete-ranges
11 
12 // constexpr drop_view(V base, range_difference_t<V> count);
13 
14 #include <ranges>
15 
16 #include "test_macros.h"
17 #include "types.h"
18 
test()19 constexpr bool test() {
20   std::ranges::drop_view dropView1(MoveOnlyView(), 4);
21   assert(dropView1.size() == 4);
22   assert(dropView1.begin() == globalBuff + 4);
23 
24   std::ranges::drop_view dropView2(ForwardView(), 4);
25   assert(base(dropView2.begin()) == globalBuff + 4);
26 
27   return true;
28 }
29 
main(int,char **)30 int main(int, char**) {
31   test();
32   static_assert(test());
33 
34   return 0;
35 }
36