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