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 T> 13 // requires is_object_v<T> 14 // class non-propagating-cache; 15 16 #include <ranges> 17 18 template<template<class...> class T, class ...Args> 19 concept well_formed = requires { 20 typename T<Args...>; 21 }; 22 23 struct T { }; 24 static_assert( well_formed<std::ranges::__non_propagating_cache, int>); 25 static_assert( well_formed<std::ranges::__non_propagating_cache, T>); 26 static_assert( well_formed<std::ranges::__non_propagating_cache, void (*)()>); 27 static_assert(!well_formed<std::ranges::__non_propagating_cache, void>); 28 static_assert(!well_formed<std::ranges::__non_propagating_cache, T&>); 29 static_assert(!well_formed<std::ranges::__non_propagating_cache, void()>); 30