Commit 5e971e46 authored by Dominik Charousset's avatar Dominik Charousset

Remove weird semantics for type_checker

The previous type checker supported the somewhat strange "skip everything from
the left" semantics that don't make sense for types messages. Relates #172.
parent 19e4b964
...@@ -109,11 +109,9 @@ struct type_checker<OutputList, F1> { ...@@ -109,11 +109,9 @@ struct type_checker<OutputList, F1> {
typename get_callable_trait<F1>::arg_types, typename get_callable_trait<F1>::arg_types,
std::decay std::decay
>::type; >::type;
static constexpr size_t args = tl_size<arg_types>::value; static_assert(std::is_same<OutputList, arg_types>::value
static_assert(args <= tl_size<OutputList>::value, || (std::is_same<OutputList, type_list<void>>::value
"functor takes too much arguments"); && std::is_same<arg_types, type_list<>>::value),
using rtypes = typename tl_right<OutputList, args>::type;
static_assert(std::is_same<arg_types, rtypes>::value,
"wrong functor signature"); "wrong functor signature");
} }
}; };
......
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