From 4c39532d7c26f6d4338a7248e7ca2062a8e4f1dc Mon Sep 17 00:00:00 2001 From: Denis Blank Date: Mon, 12 Mar 2018 05:42:27 +0100 Subject: [PATCH] In source documentation improvements --- Readme.md | 4 ++-- include/continuable/continuable-base.hpp | 15 ++++++------ .../continuable/continuable-transforms.hpp | 7 ++++-- .../continuable-traverse-async.hpp | 23 +++++++++++-------- 4 files changed, 28 insertions(+), 21 deletions(-) diff --git a/Readme.md b/Readme.md index 5472ba1..56ec44d 100644 --- a/Readme.md +++ b/Readme.md @@ -37,6 +37,6 @@ The [documentation](https://naios.github.io/continuable/) offers everything you #### Issues and contributions -Issues reports are accepted through the Github issue tracker as well as Pull requests. +Issue reports are accepted through the Github issue tracker as well as Pull requests. Every contribution is welcome! Don't hesitate to ask for help if you need any support -in changing the implementation or when using the library. +in improving the implementation or if you have any troubles in using the library. diff --git a/include/continuable/continuable-base.hpp b/include/continuable/continuable-base.hpp index d8b9703..f270547 100644 --- a/include/continuable/continuable-base.hpp +++ b/include/continuable/continuable-base.hpp @@ -89,7 +89,8 @@ using error_type = detail::types::error_type; /// Deduces to a true_type if the given type is a continuable_base. /// /// \since 3.0.0 -using detail::base::is_continuable; +template +using is_continuable = detail::base::is_continuable; /// The main class of the continuable library, it provides the functionality /// for chaining callbacks and continuations together to a unified hierarchy. @@ -791,7 +792,7 @@ private: /// /// \since 1.0.0 template -auto make_continuable(Continuation&& continuation) { +constexpr auto make_continuable(Continuation&& continuation) { static_assert(sizeof...(Args) > 0, "Since version 3.0.0 make_continuable requires an exact " "signature! If you did intend to create a void continuable " @@ -804,7 +805,7 @@ auto make_continuable(Continuation&& continuation) { detail::util::ownership{}); } -/// Returns a continuable with no result which instantly resolves +/// Returns a continuable_base with no result which instantly resolves /// the promise with no values. /// /// \attention Usually using this function isn't needed at all since @@ -821,7 +822,7 @@ constexpr auto make_ready_continuable() { }); } -/// Returns a continuable with one result value which instantly resolves +/// Returns a continuable_base with one result value which instantly resolves /// the promise with the given value. /// /// \copydetails make_ready_continuable() @@ -833,8 +834,8 @@ constexpr auto make_ready_continuable(Result&& result) { }); } -/// Returns a continuable with multiple result values which instantly resolves -/// the promise with the given values. +/// Returns a continuable_base with multiple result values which instantly +/// resolves the promise with the given values. /// /// \copydetails make_ready_continuable() template @@ -852,7 +853,7 @@ constexpr auto make_ready_continuable(FirstResult&& first_result, }); } -/// Returns a continuable with the parameterized result which instantly +/// Returns a continuable_base with the parameterized result which instantly /// resolves the promise with the given error type. /// /// See an example below: diff --git a/include/continuable/continuable-transforms.hpp b/include/continuable/continuable-transforms.hpp index 06f835f..db841cb 100644 --- a/include/continuable/continuable-transforms.hpp +++ b/include/continuable/continuable-transforms.hpp @@ -36,14 +36,17 @@ namespace cti { /// \defgroup Transforms Transforms -/// provides utilities to convert \link continuable_base continuable_bases\endlink to other types (`std::future`). +/// provides utilities to convert +/// \link continuable_base continuable_bases\endlink to other +/// types such as (`std::future`). /// \{ /// A callable tag object which marks a wrapped callable object /// as continuable transformation which enables some useful overloads. /// /// \since 3.0.0 -using detail::types::transform; +template +using transform = detail::types::transform; /// Wraps the given callable object into a transform class. /// diff --git a/include/continuable/continuable-traverse-async.hpp b/include/continuable/continuable-traverse-async.hpp index 92ef38a..42ff8e5 100644 --- a/include/continuable/continuable-traverse-async.hpp +++ b/include/continuable/continuable-traverse-async.hpp @@ -41,26 +41,29 @@ namespace cti { /// \{ /// A tag which is passed to the `operator()` of the visitor -/// if an element is visited synchronously. +/// if an element is visited synchronously through \ref traverse_pack_async. /// /// \since 3.0.0 -using detail::traversal::async_traverse_visit_tag; -/// A tag which is passed to the `operator()` of the visitor -/// if an element is visited after the traversal was detached. +using async_traverse_visit_tag = detail::traversal::async_traverse_visit_tag; +/// A tag which is passed to the `operator()` of the visitor if an element is +/// visited after the traversal was detached through \ref traverse_pack_async. /// /// \since 3.0.0 -using detail::traversal::async_traverse_detach_tag; -/// A tag which is passed to the `operator()` of the visitor -/// if the asynchronous pack traversal was finished. +using async_traverse_detach_tag = detail::traversal::async_traverse_detach_tag; +/// A tag which is passed to the `operator()` of the visitor if the +/// asynchronous pack traversal was finished through \ref traverse_pack_async. /// /// \since 3.0.0 -using detail::traversal::async_traverse_complete_tag; +using async_traverse_complete_tag = + detail::traversal::async_traverse_complete_tag; /// A tag to identify that a mapper shall be constructed in-place -/// from the first argument passed. +/// from the first argument passed to \ref traverse_pack_async. /// /// \since 3.0.0 -using detail::traversal::async_traverse_in_place_tag; +template +using async_traverse_in_place_tag = + detail::traversal::async_traverse_in_place_tag; /// Traverses the pack with the given visitor in an asynchronous way. ///