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 // explicit std::ranges::lazy_split_view::outer-iterator::outer-iterator(Parent& parent) 13 // requires (!forward_range<Base>) 14 15 #include <ranges> 16 17 #include <type_traits> 18 #include <utility> 19 #include "../types.h" 20 21 // Verify that the constructor is `explicit`. 22 static_assert(!std::is_convertible_v<SplitViewInput&, OuterIterInput>); 23 24 static_assert( std::ranges::forward_range<SplitViewForward>); 25 static_assert(!std::is_constructible_v<OuterIterForward, SplitViewForward&>); 26 27 constexpr bool test() { 28 InputView input; 29 SplitViewInput v(input, ForwardTinyView()); 30 [[maybe_unused]] OuterIterInput i(v); 31 32 return true; 33 } 34 35 int main(int, char**) { 36 test(); 37 static_assert(test()); 38 39 return 0; 40 } 41