Commit fd918705 authored by Dominik Charousset's avatar Dominik Charousset

return result of match expression

parent bc4ca0bc
...@@ -57,12 +57,12 @@ struct match_helper { ...@@ -57,12 +57,12 @@ struct match_helper {
} }
*/ */
template<class Arg0, class... Args> template<class Arg0, class... Args>
void operator()(Arg0&& arg0, Args&&... args) { bool operator()(Arg0&& arg0, Args&&... args) {
auto tmp = match_expr_convert(std::forward<Arg0>(arg0), auto tmp = match_expr_convert(std::forward<Arg0>(arg0),
std::forward<Args>(args)...); std::forward<Args>(args)...);
static_assert(std::is_same<partial_function, decltype(tmp)>::value, static_assert(std::is_same<partial_function, decltype(tmp)>::value,
"match statement contains timeout"); "match statement contains timeout");
tmp(tup); return tmp(tup);
} }
}; };
......
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