diff --git a/include/continuable/continuable-base.hpp b/include/continuable/continuable-base.hpp index 7d413f3..1c13e42 100644 --- a/include/continuable/continuable-base.hpp +++ b/include/continuable/continuable-base.hpp @@ -48,6 +48,7 @@ namespace cti { template class continuable_base { + /// \cond false template friend class continuable_base; @@ -601,6 +602,8 @@ auto make_continuable(Continuation&& continuation) { /// // Will receive errors and results /// continuable.then(my_callable{}); /// ``` +/// +/// \since version 2.0.0 using detail::types::dispatch_error_tag; /// Represents the type that is used as error type @@ -610,6 +613,8 @@ using detail::types::dispatch_error_tag; /// will be a `std::error_condition`. /// A custom error type may be set through /// defining `CONTINUABLE_WITH_CUSTOM_ERROR_TYPE`. +/// +/// \since version 2.0.0 using detail::types::error_type; /// Connects the given continuables with an *all* logic. diff --git a/include/continuable/continuable-promise-base.hpp b/include/continuable/continuable-promise-base.hpp index f48a564..a48122c 100644 --- a/include/continuable/continuable-promise-base.hpp +++ b/include/continuable/continuable-promise-base.hpp @@ -40,11 +40,19 @@ #include namespace cti { +/// The promise_base makes it possible to resolve an asynchronous +/// continuable through it's result or through an error type. +/// +/// Use the promise type defined in `continuable/continuable.hpp`, +/// in order to use this class. +/// +/// \since version 2.0.0 template class promise_base; template class promise_base> : detail::util::non_copyable { + /// \cond false // The callback type Data data_; @@ -62,21 +70,29 @@ public: } /// Resolves the continuation with the given values + /// + /// \since version 2.0.0 void operator()(Args... args) { data_(std::move(args)...); } /// Resolves the continuation with the given exception + /// + /// \since version 2.0.0 void operator()(detail::types::dispatch_error_tag tag, detail::types::error_type exception) { data_(tag, std::move(exception)); } /// Resolves the continuation with the given values + /// + /// \since version 2.0.0 void set_value(Args... args) { data_(std::move(args)...); } /// Resolves the continuation with the given exception + /// + /// \since version 2.0.0 void set_exception(detail::types::error_type exception) { data_(detail::types::dispatch_error_tag{}, std::move(exception)); } diff --git a/include/continuable/detail/api.hpp b/include/continuable/detail/api.hpp index 0933d2e..36a8d84 100644 --- a/include/continuable/detail/api.hpp +++ b/include/continuable/detail/api.hpp @@ -51,6 +51,9 @@ namespace cti { /// The most important method is the cti::continuable_base::then() method, /// which allows to attach a callback to the continuable. /// +/// Use the continuable types defined in `continuable/continuable.hpp`, +/// in order to use this class. +/// /// \tparam Data The internal data which is used to store the current /// continuation and intermediate lazy connection result. ///