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