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