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