auto call_tuple_unwrap_prefix(Callable const& callable, T const& tuple
, eina::index_sequence<S...>
, Args&&... args)
- -> decltype(callable(std::move(args)..., std::get<S>(tuple)...))
+ -> decltype(callable(std::forward<Args>(args)..., std::get<S>(tuple)...))
{
- return callable(std::move(args)..., std::get<S>(tuple)...);
+ return callable(std::forward<Args>(args)..., std::get<S>(tuple)...);
}
template <typename Callable, typename T, std::size_t... S
auto call_tuple_unwrap_suffix(Callable const& callable, T const& tuple
, eina::index_sequence<S...>
, Args&&... args)
- -> decltype(callable(std::get<S>(tuple)..., std::move(args)...))
+ -> decltype(callable(std::get<S>(tuple)..., std::forward<Args>(args)...))
{
- return callable(std::get<S>(tuple)..., std::move(args)...);
+ return callable(std::get<S>(tuple)..., std::forward<Args>(args)...);
}
} }
template <typename R, typename Callback, typename... Args>
void call(const char* method, double timeout, Callback&& callback, Args... args) const
{
- eldbus::_detail::proxy_call<R>(_proxy, method, timeout, std::move(callback), args...);
+ eldbus::_detail::proxy_call<R>(_proxy, method, timeout, std::forward<Callback>(callback), args...);
}
template <typename Callback, typename... Args>
void call(const char* method, double timeout, Callback&& callback, Args... args) const
{
- eldbus::_detail::proxy_call<void>(_proxy, method, timeout, std::move(callback), args...);
+ eldbus::_detail::proxy_call<void>(_proxy, method, timeout, std::forward<Callback>(callback), args...);
}
native_handle_type native_handle() { return _proxy; }
template <typename... Ins, typename F>
pending name_request(connection& c, const char* bus, unsigned int flags, F&& function)
{
- F* f = new F(std::move(function));
+ F* f = new F(std::forward<F>(function));
pending r = ::eldbus_name_request(c.native_handle(), bus, flags
, &_detail::_callback_wrapper<F, Ins...>, f);
eldbus_pending_free_cb_add(r.native_handle(), &_detail::_free_cb<F>, f);
_detail::init_signature_array<Args...>
(signature, eina::make_index_sequence<signature_size<tuple_args>::value +1>());
- Callback* c = new Callback(std::move(callback));
+ Callback* c = new Callback(std::forward<Callback>(callback));
eldbus_proxy_call(proxy, method, &_on_call<R, Callback>, c, timeout, signature
, _detail::to_raw(args)...);
, Callback&& callback, Args const&... args)
{
typedef std::tuple<R> reply_tuple;
- _detail::proxy_call_impl2<reply_tuple>(proxy, method, timeout, std::move(callback), args...);
+ _detail::proxy_call_impl2<reply_tuple>(proxy, method, timeout, std::forward<Callback>(callback), args...);
}
template <typename... R, typename Callback, typename... Args>
, Callback&& callback, Args const&... args)
{
typedef std::tuple<R...> reply_tuple;
- _detail::proxy_call_impl2<reply_tuple>(proxy, method, timeout, std::move(callback), args...);
+ _detail::proxy_call_impl2<reply_tuple>(proxy, method, timeout, std::forward<Callback>(callback), args...);
}
template <typename Callback, typename... Args>
, Callback&& callback, Args const&... args)
{
typedef std::tuple<> reply_tuple;
- _detail::proxy_call_impl2<reply_tuple>(proxy, method, timeout, std::move(callback), args...);
+ _detail::proxy_call_impl2<reply_tuple>(proxy, method, timeout, std::forward<Callback>(callback), args...);
}
template <typename R, typename Callback, typename... Args>
void proxy_call(Eldbus_Proxy* proxy, const char* method, double timeout
, Callback&& callback, Args const&... args)
{
- return proxy_call_impl(tag<R>(), proxy, method, timeout, std::move(callback), args...);
+ return proxy_call_impl(tag<R>(), proxy, method, timeout, std::forward<Callback>(callback), args...);
}
} } }