//===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14, c++17 // concept checking // template // requires input_range && is_object_v && // indirect_unary_predicate> // class take_while_view; #include #include #include "test_iterators.h" template using Range = std::ranges::subrange>; template struct Pred { bool operator()(const Val&) const; }; template concept HasTakeWhileView = requires { typename std::ranges::take_while_view; }; static_assert(HasTakeWhileView, bool (*)(int)>); static_assert(HasTakeWhileView, Pred>); // !view static_assert(!HasTakeWhileView, Pred>); // !input_range static_assert(!HasTakeWhileView>, bool (*)(int)>); // !is_object_v static_assert(!HasTakeWhileView, Pred&>); // !indirect_unary_predicate> static_assert(!HasTakeWhileView, int>); static_assert(!HasTakeWhileView, Pred>);