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-no-concepts 11 // UNSUPPORTED: libcpp-has-no-incomplete-ranges 12 13 // template<class T> 14 // single_view(T) -> single_view<T>; 15 16 #include <ranges> 17 18 #include <cassert> 19 #include <concepts> 20 21 #include "test_iterators.h" 22 23 struct Empty {}; 24 25 static_assert(std::same_as< 26 decltype(std::ranges::single_view(Empty())), 27 std::ranges::single_view<Empty> 28 >); 29 30 static_assert(std::same_as< 31 decltype(std::ranges::single_view(std::declval<Empty&>())), 32 std::ranges::single_view<Empty> 33 >); 34 35 static_assert(std::same_as< 36 decltype(std::ranges::single_view(std::declval<Empty&&>())), 37 std::ranges::single_view<Empty> 38 >); 39