Please use GitHub pull requests for new patches. Phabricator shutdown timeline
Differential D126098 Diff 432702 libcxx/test/std/concepts/concepts.callable/concept.regularinvocable/regular_invocable.compile.pass.cpp
Changeset View
Changeset View
Standalone View
Standalone View
libcxx/test/std/concepts/concepts.callable/concept.regularinvocable/regular_invocable.compile.pass.cpp
//===----------------------------------------------------------------------===// | //===----------------------------------------------------------------------===// | ||||
// | // | ||||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | ||||
// See https://llvm.org/LICENSE.txt for license information. | // See https://llvm.org/LICENSE.txt for license information. | ||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||||
// | // | ||||
//===----------------------------------------------------------------------===// | //===----------------------------------------------------------------------===// | ||||
// UNSUPPORTED: c++03, c++11, c++14, c++17 | // UNSUPPORTED: c++03, c++11, c++14, c++17 | ||||
// template<class T, class U> | // template<class T, class U> | ||||
// concept regular_invocable; | // concept regular_invocable; | ||||
#include <chrono> | #include <chrono> | ||||
#include <concepts> | #include <concepts> | ||||
#include <functional> | |||||
#include <memory> | #include <memory> | ||||
#include <random> | #include <random> | ||||
#include <type_traits> | #include <type_traits> | ||||
template <class R, class... Args> | template <class R, class... Args> | ||||
constexpr bool check_invocable() { | constexpr bool check_invocable() { | ||||
constexpr bool result = std::regular_invocable<R(Args...), Args...>; | constexpr bool result = std::regular_invocable<R(Args...), Args...>; | ||||
static_assert(std::regular_invocable<R(Args...) noexcept, Args...> == result); | static_assert(std::regular_invocable<R(Args...) noexcept, Args...> == result); | ||||
▲ Show 20 Lines • Show All 437 Lines • Show Last 20 Lines |