Commit 68e0e638 authored by Dominik Charousset's avatar Dominik Charousset

Move match_elements with type_list to public

parent 7c54a6ec
...@@ -189,17 +189,19 @@ public: ...@@ -189,17 +189,19 @@ public:
return apply(fun, result_token, args_token); return apply(fun, result_token, args_token);
} }
private: /// @private
template <class T, class... Ts> template <class T, class... Ts>
bool match_elements(detail::type_list<T, Ts...>) const noexcept { bool match_elements(detail::type_list<T, Ts...>) const noexcept {
detail::meta_elements<detail::type_list<T, Ts...>> xs; detail::meta_elements<detail::type_list<T, Ts...>> xs;
return detail::try_match(*this, &xs.arr[0], 1 + sizeof...(Ts)); return detail::try_match(*this, &xs.arr[0], 1 + sizeof...(Ts));
} }
/// @private
inline bool match_elements(detail::type_list<>) const noexcept { inline bool match_elements(detail::type_list<>) const noexcept {
return empty(); return empty();
} }
private:
template <class F, class R, class... Ts> template <class F, class R, class... Ts>
optional<R> apply(F& fun, detail::type_list<R>, optional<R> apply(F& fun, detail::type_list<R>,
detail::type_list<Ts...> tk) { detail::type_list<Ts...> tk) {
......
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