diff --git a/fluent++/Callback.h b/fluent++/Callback.h index 23f324b..d8f22de 100644 --- a/fluent++/Callback.h +++ b/fluent++/Callback.h @@ -36,21 +36,21 @@ using WeakCallback = std::weak_ptr>; namespace detail { - template + template struct do_unwrap_callback; - template - struct do_unwrap_callback<::fu::identity> + template + struct do_unwrap_callback> { - typedef Callback CallbackType; + typedef Callback<_ATy...> CallbackType; - typedef SharedCallback SharedCallbackType; + typedef SharedCallback<_ATy...> SharedCallbackType; - typedef WeakCallback WeakCallbackType; + typedef WeakCallback<_ATy...> WeakCallbackType; }; template - using unwrap_callback = do_unwrap_callback<::fu::argument_type_of_t<_CTy>>; + using unwrap_callback_t = do_unwrap_callback<::fu::function_type_of_t<_CTy>>; /* template @@ -75,13 +75,13 @@ namespace detail } // detail template -using callback_of_t = typename detail::unwrap_callback<_CTy>::CallbackType; +using callback_of_t = typename detail::unwrap_callback_t<_CTy>::CallbackType; template -using shared_callback_of_t = typename detail::unwrap_callback<_CTy>::SharedCallbackType; +using shared_callback_of_t = typename detail::unwrap_callback_t<_CTy>::SharedCallbackType; template -using weak_callback_of_t = typename detail::unwrap_callback<_CTy>::WeakCallbackType; +using weak_callback_of_t = typename detail::unwrap_callback_t<_CTy>::WeakCallbackType; template inline shared_callback_of_t<_CTy> diff --git a/test.cpp b/test.cpp index 31d3cd2..728d6e3 100644 --- a/test.cpp +++ b/test.cpp @@ -29,6 +29,9 @@ Continuable CastSpell(int id) int main(int argc, char** argv) { + typedef shared_callback_of_t sc1; + typedef weak_callback_of_t> sc2; + typedef Continuable cont123; // typedef Continuable>::type myty1;