diff --git a/fluent++/Continuable.h b/fluent++/Continuable.h index 3a9b77a..a66af42 100644 --- a/fluent++/Continuable.h +++ b/fluent++/Continuable.h @@ -18,6 +18,27 @@ #ifndef _CONTINUABLE_H_ #define _CONTINUABLE_H_ +#include "Callback.h" +template +class ContinuableBase +{ + +}; + +template +class Continuable; + +template +class Continuable, void> +{ + +}; + +template +class Continuable, _WTy> +{ + static_assert(false, ""); +}; #endif /// _CONTINUABLE_H_ diff --git a/fluent++/fluent++.hpp b/fluent++/fluent++.hpp index c64e4a7..5fc82c2 100644 --- a/fluent++/fluent++.hpp +++ b/fluent++/fluent++.hpp @@ -63,23 +63,23 @@ fluent_step make_waterfall() } -struct Continueable +struct ProtoContinueable { template - Continueable then(Callback&& callback) + ProtoContinueable then(Callback&& callback) { - return Continueable(); + return ProtoContinueable(); } template - Continueable weak(Container& container) + ProtoContinueable weak(Container& container) { - return Continueable(); + return ProtoContinueable(); } - Continueable strong() + ProtoContinueable strong() { - return Continueable(); + return ProtoContinueable(); } }; diff --git a/test.cpp b/test.cpp index be817fb..72a4af3 100644 --- a/test.cpp +++ b/test.cpp @@ -3,24 +3,25 @@ #include "Callback.h" #include "WeakCallbackContainer.h" +#include "Continuable.h" #include #include -Continueable CastSpell(int id) +ProtoContinueable CastSpell(int id) { std::cout << "Cast " << id << std::endl; // on success call true - return Continueable(); + return ProtoContinueable(); } -Continueable MoveTo(int point) +ProtoContinueable MoveTo(int point) { std::cout << "Move to point " << point << std::endl; // on success call true - return Continueable(); + return ProtoContinueable(); } void CastSpell(int id, Callback const& callback) @@ -146,5 +147,8 @@ int main(int argc, char** argv) wrapped(); wrapped2(); + + typedef Continuable> cont; + return 0; }