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