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