From 8d851d6d42ff236228d56336883b8b2384fa357d Mon Sep 17 00:00:00 2001 From: Denis Blank Date: Fri, 3 Mar 2017 17:10:29 +0100 Subject: [PATCH] Rework the alias trait --- include/continuable/continuable-base.hpp | 29 ++++++++-- include/continuable/continuable-testing.hpp | 2 +- include/continuable/continuable.hpp | 63 +++++++++++++++++---- test/playground/test-playground.cpp | 25 -------- test/unit-test/test-continuable-erasure.cpp | 11 ++++ 5 files changed, 86 insertions(+), 44 deletions(-) diff --git a/include/continuable/continuable-base.hpp b/include/continuable/continuable-base.hpp index c5def58..d3d289d 100644 --- a/include/continuable/continuable-base.hpp +++ b/include/continuable/continuable-base.hpp @@ -5,7 +5,7 @@ \_,(_)| | | || ||_|(_||_)|(/_ https://github.com/Naios/continuable - + v0.8.0 Copyright(c) 2015 - 2017 Denis Blank @@ -1997,14 +1997,31 @@ auto seq_of(Continuables&&... continuables) { std::forward(continuables)...); } +/// Trait to retrieve a continuable_base type with a given type-erasure backend. +/// +/// Every object may me used as type-erasure backend as long as the +/// requirements of a `std::function` like wrapper are satisfied. +/// +/// \tparam CallbackWrapper The type which is used to erase the callback. +/// +/// \tparam ContinuationWrapper The type which is used to erase the +/// continuation data. +/// +/// \tparam Args The current signature of the continuable. template