Commit 39963a47 authored by Dominik Charousset's avatar Dominik Charousset

Fix shadowing warnings

parent 8b45b58f
...@@ -82,24 +82,24 @@ class lifted_fun_invoker { ...@@ -82,24 +82,24 @@ class lifted_fun_invoker {
using arg_types = typename get_callable_trait<F>::arg_types; using arg_types = typename get_callable_trait<F>::arg_types;
static constexpr size_t args = tl_size<arg_types>::value; static constexpr size_t num_args = tl_size<arg_types>::value;
public: public:
lifted_fun_invoker(F& fun) : f(fun) {} lifted_fun_invoker(F& fun) : f(fun) {}
template <class... Ts> template <class... Ts>
typename std::enable_if<sizeof...(Ts) == args, R>::type typename std::enable_if<sizeof...(Ts) == num_args, R>::type
operator()(Ts&... args) const { operator()(Ts&... vs) const {
if (has_none(args...)) return none; if (has_none(vs...)) return none;
return f(unopt(args)...); return f(unopt(vs)...);
} }
template <class T, class... Ts> template <class T, class... Ts>
typename std::enable_if<(sizeof...(Ts) + 1 > args), R>::type typename std::enable_if<(sizeof...(Ts) + 1 > num_args), R>::type
operator()(T& arg, Ts&... args) const { operator()(T& v, Ts&... vs) const {
if (has_none(arg)) return none; if (has_none(v)) return none;
return (*this)(args...); return (*this)(vs...);
} }
private: private:
...@@ -113,25 +113,25 @@ class lifted_fun_invoker<bool, F> { ...@@ -113,25 +113,25 @@ class lifted_fun_invoker<bool, F> {
using arg_types = typename get_callable_trait<F>::arg_types; using arg_types = typename get_callable_trait<F>::arg_types;
static constexpr size_t args = tl_size<arg_types>::value; static constexpr size_t num_args = tl_size<arg_types>::value;
public: public:
lifted_fun_invoker(F& fun) : f(fun) {} lifted_fun_invoker(F& fun) : f(fun) {}
template <class... Ts> template <class... Ts>
typename std::enable_if<sizeof...(Ts) == args, bool>::type typename std::enable_if<sizeof...(Ts) == num_args, bool>::type
operator()(Ts&&... args) const { operator()(Ts&&... vs) const {
if (has_none(args...)) return false; if (has_none(vs...)) return false;
f(unopt(args)...); f(unopt(vs)...);
return true; return true;
} }
template <class T, class... Ts> template <class T, class... Ts>
typename std::enable_if<(sizeof...(Ts) + 1 > args), bool>::type typename std::enable_if<(sizeof...(Ts) + 1 > num_args), bool>::type
operator()(T&& arg, Ts&&... args) const { operator()(T&& arg, Ts&&... vs) const {
if (has_none(arg)) return false; if (has_none(arg)) return false;
return (*this)(args...); return (*this)(vs...);
} }
private: private:
......
...@@ -67,11 +67,11 @@ class typed_server3 : public server_type::base { ...@@ -67,11 +67,11 @@ class typed_server3 : public server_type::base {
void client(event_based_actor* self, actor parent, server_type serv) { void client(event_based_actor* self, actor parent, server_type serv) {
self->sync_send(serv, my_request{0, 0}).then( self->sync_send(serv, my_request{0, 0}).then(
[=](bool value) { [=](bool val1) {
CAF_CHECK_EQUAL(value, true); CAF_CHECK_EQUAL(val1, true);
self->sync_send(serv, my_request{10, 20}).then( self->sync_send(serv, my_request{10, 20}).then(
[=](bool value) { [=](bool val2) {
CAF_CHECK_EQUAL(value, false); CAF_CHECK_EQUAL(val2, false);
self->send(parent, atom("passed")); self->send(parent, atom("passed"));
} }
); );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment