Skip to content

Commit

Permalink
Added invokable_with concept
Browse files Browse the repository at this point in the history
  • Loading branch information
codeinred committed Aug 27, 2020
1 parent ee64246 commit b7ad1c4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions include/conduit/util/concepts.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#pragma once
#include <conduit/util/stdlib_coroutine.hpp>

#include <cstddef>
#include <type_traits>
#include <utility>

namespace conduit {
// clang-format off
Expand Down Expand Up @@ -72,5 +74,10 @@ concept can_co_return = co_result<Result>

template<class Promise>
concept awaitable_promise = awaitable<Promise> && co_promise<Promise>;

template<class Func, class... Args>
concept invokable_with = requires(Func f, Args... args) {
{ f(std::forward<Args>(args)...) };
};
// clang-format on
} // namespace conduit

0 comments on commit b7ad1c4

Please sign in to comment.