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 R> 14 // explicit join_view(R&&) -> join_view<views::all_t<R>>; 15 16 // Tests that the deduction guide is explicit. 17 18 #include <ranges> 19 20 #include "test_iterators.h" 21 22 template<class T> 23 struct Range { 24 friend T* begin(Range&) { return nullptr; } 25 friend T* begin(Range const&) { return nullptr; } 26 friend sentinel_wrapper<T*> end(Range&) { return sentinel_wrapper<T*>(nullptr); } 27 friend sentinel_wrapper<T*> end(Range const&) { return sentinel_wrapper<T*>(nullptr); } 28 }; 29 30 void testExplicitCTAD() { 31 Range<Range<int>> r; 32 std::ranges::join_view v = r; // expected-error {{no viable constructor or deduction guide for deduction of template arguments of 'join_view'}} 33 } 34