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