mirror of
https://github.com/Naios/continuable.git
synced 2025-12-08 09:47:43 +08:00
minor improvements
This commit is contained in:
parent
444af12a6d
commit
e5d39c4b0a
@ -25,7 +25,7 @@
|
||||
|
||||
#include "functional_unwrap.hpp"
|
||||
|
||||
/// A general purpose Callback type (Callable/Invokeable)
|
||||
/// A general purpose Callback type (Callable/ Invokeable)
|
||||
template<typename... Args>
|
||||
using Callback = std::function<void(Args...)>;
|
||||
|
||||
@ -66,8 +66,8 @@ namespace detail
|
||||
return [=](Args&&... args)
|
||||
{
|
||||
if (auto const callback = weak.lock())
|
||||
// FIXME: use std::forward
|
||||
(*callback)(args...);
|
||||
// FIXME: use std::forward
|
||||
(*callback)(args...);
|
||||
};
|
||||
}
|
||||
};
|
||||
@ -113,4 +113,4 @@ inline auto make_weak_wrapped_callback(_CTy const& callback)
|
||||
return detail::WeakProxyFactory<_CTy>::CreateProxy(callback);
|
||||
}
|
||||
|
||||
#endif /// _CALLBACK_H_
|
||||
#endif // _CALLBACK_H_
|
||||
|
||||
@ -78,4 +78,4 @@ inline auto make_continuable(_FTy&& functional)
|
||||
return detail::continuable_factory_t<_FTy>::CreateFrom(std::forward<_FTy>(functional));
|
||||
}
|
||||
|
||||
#endif /// _CONTINUABLE_H_
|
||||
#endif // _CONTINUABLE_H_
|
||||
|
||||
@ -122,4 +122,4 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
#endif /// _WEAK_CALLBACK_CONTAINER_H_
|
||||
#endif // _WEAK_CALLBACK_CONTAINER_H_
|
||||
|
||||
@ -28,10 +28,9 @@
|
||||
|
||||
namespace fu
|
||||
{
|
||||
/// Identity class which is used to carry parameter packs.
|
||||
template<typename... Args>
|
||||
struct identity
|
||||
{
|
||||
};
|
||||
struct identity { };
|
||||
|
||||
namespace detail
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user