mirror of
https://github.com/Naios/continuable.git
synced 2026-02-15 06:39:49 +08:00
Promote is_continuable to the public API
This commit is contained in:
parent
7c0aa6e6ba
commit
cd42a7b2ba
@ -44,6 +44,11 @@
|
|||||||
#include <continuable/detail/util.hpp>
|
#include <continuable/detail/util.hpp>
|
||||||
|
|
||||||
namespace cti {
|
namespace cti {
|
||||||
|
/// Deduces to a true_type if the given type is a continuable_base.
|
||||||
|
///
|
||||||
|
/// \since 3.0.0
|
||||||
|
using detail::base::is_continuable;
|
||||||
|
|
||||||
/// The main class of the continuable library, it provides the functionality
|
/// The main class of the continuable library, it provides the functionality
|
||||||
/// for chaining callbacks and continuations together to a unified hierarchy.
|
/// for chaining callbacks and continuations together to a unified hierarchy.
|
||||||
///
|
///
|
||||||
|
|||||||
@ -63,9 +63,9 @@ namespace detail {
|
|||||||
/// -> void
|
/// -> void
|
||||||
namespace base {
|
namespace base {
|
||||||
template <typename T>
|
template <typename T>
|
||||||
struct is_continuation : std::false_type {};
|
struct is_continuable : std::false_type {};
|
||||||
template <typename Data, typename Annotation>
|
template <typename Data, typename Annotation>
|
||||||
struct is_continuation<continuable_base<Data, Annotation>> : std::true_type {};
|
struct is_continuable<continuable_base<Data, Annotation>> : std::true_type {};
|
||||||
|
|
||||||
/// Helper class to access private methods and members of
|
/// Helper class to access private methods and members of
|
||||||
/// the continuable_base class.
|
/// the continuable_base class.
|
||||||
@ -501,7 +501,7 @@ template <handle_results HandleResults, handle_errors HandleErrors,
|
|||||||
typename Continuation, typename Callback, typename Executor>
|
typename Continuation, typename Callback, typename Executor>
|
||||||
auto chain_continuation(Continuation&& continuation, Callback&& callback,
|
auto chain_continuation(Continuation&& continuation, Callback&& callback,
|
||||||
Executor&& executor) {
|
Executor&& executor) {
|
||||||
static_assert(is_continuation<std::decay_t<Continuation>>{},
|
static_assert(is_continuable<std::decay_t<Continuation>>{},
|
||||||
"Expected a continuation!");
|
"Expected a continuation!");
|
||||||
|
|
||||||
using Hint = decltype(hints::hint_of(traits::identity_of(continuation)));
|
using Hint = decltype(hints::hint_of(traits::identity_of(continuation)));
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user