brintos

brintos / llvm-project-archived public Read only

0
0
Text · 941 B · aa01907 Raw
31 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// common_view() requires default_initializable<V> = default;12 13#include <ranges>14 15#include <cassert>16#include <concepts>17 18#include "test_iterators.h"19#include "types.h"20 21int main(int, char**) {22  static_assert(!std::default_initializable<std::ranges::common_view<MoveOnlyView>>);23  static_assert( std::default_initializable<std::ranges::common_view<DefaultConstructibleView>>);24 25  std::ranges::common_view<DefaultConstructibleView> common;26  assert(common.begin() == nullptr);27  assert(common.end() == nullptr);28 29  return 0;30}31