From 121265df7123cf672ea8db917eaca2d0fbd9aef5 Mon Sep 17 00:00:00 2001 From: Denis Blank Date: Mon, 10 Dec 2018 17:37:25 +0100 Subject: [PATCH] Cleanup in result<> --- include/continuable/continuable-result.hpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/include/continuable/continuable-result.hpp b/include/continuable/continuable-result.hpp index 7cc6d4e..6ea4093 100644 --- a/include/continuable/continuable-result.hpp +++ b/include/continuable/continuable-result.hpp @@ -50,10 +50,16 @@ namespace cti { /// A class which is convertible to any \ref result and that definitly holds no /// value so the real result gets invalidated when this object is passed to it. +/// +/// \since 4.0.0 +/// struct empty_result {}; /// A class which is convertible to any result and that definitly holds /// an exception which is then passed to the converted result object. +/// +/// \since 4.0.0 +/// class exceptional_result { exception_t exception_; @@ -117,14 +123,14 @@ public: /// result.get_exception(); /// ``` /// +/// \since 4.0.0 +/// template class result { using trait_t = detail::result_trait; using surrogate_t = typename trait_t::surrogate_t; struct init_arg_t {}; - template - friend result...> make_result(Args&&...); template ()...))>* = nullptr> @@ -272,6 +278,8 @@ decltype(auto) get(result&& result) { } /// Creates a present result from the given values +/// +/// \since 4.0.0 template ...>> Result make_result(T&&... values) {