brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1017 B · 634db24 Raw
38 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// REQUIRES: std-at-least-c++2310 11// <ranges>12 13// sentinel() = default;14 15#include <ranges>16 17#include "../types.h"18 19constexpr bool test() {20  using Inner   = BasicVectorView<char, ViewProperties{.common = false}, forward_iterator>;21  using V       = BasicVectorView<Inner, ViewProperties{}, forward_iterator>;22  using Pattern = Inner;23  using JWV     = std::ranges::join_with_view<V, Pattern>;24  static_assert(!std::ranges::common_range<JWV>);25 26  [[maybe_unused]] std::ranges::sentinel_t<JWV> se;27  [[maybe_unused]] std::ranges::sentinel_t<const JWV> cse;28 29  return true;30}31 32int main(int, char**) {33  test();34  static_assert(test());35 36  return 0;37}38