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 // CTAD tests. 14 15 #include <ranges> 16 #include <concepts> 17 18 #include "test_macros.h" 19 #include "types.h" 20 21 static_assert(std::same_as<decltype(std::ranges::transform_view(InputView(), PlusOne())), 22 std::ranges::transform_view<InputView, PlusOne>>); 23 static_assert(std::same_as<decltype(std::ranges::transform_view(std::declval<ForwardRange&>(), PlusOne())), 24 std::ranges::transform_view<std::ranges::ref_view<ForwardRange>, PlusOne>>); 25 static_assert(std::same_as<decltype(std::ranges::transform_view(BorrowableRange(), PlusOne())), 26 std::ranges::transform_view<std::ranges::subrange<int*>, PlusOne>>); 27