minor improvements

This commit is contained in:
Naios 2015-06-11 03:21:25 +02:00
parent 444af12a6d
commit e5d39c4b0a
4 changed files with 8 additions and 9 deletions

View File

@ -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_

View File

@ -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_

View File

@ -122,4 +122,4 @@ public:
}
};
#endif /// _WEAK_CALLBACK_CONTAINER_H_
#endif // _WEAK_CALLBACK_CONTAINER_H_

View File

@ -28,10 +28,9 @@
namespace fu
{
/// Identity class which is used to carry parameter packs.
template<typename... Args>
struct identity
{
};
struct identity { };
namespace detail
{