diff options
Diffstat (limited to 'src/conditional/cond.h')
-rw-r--r-- | src/conditional/cond.h | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/src/conditional/cond.h b/src/conditional/cond.h index 2d6a415..f6b7965 100644 --- a/src/conditional/cond.h +++ b/src/conditional/cond.h @@ -8,22 +8,29 @@ namespace tav { +namespace detail { + template <typename... Branches> class Cond { private: template <typename Pair> - using predicate = IsTrue<Eval<Eval<Car<Pair>>>>; + using predicate = IsTrue<tav::Car<Pair>>; public: - typedef Eval<Cdr< - Eval<Find< + typedef tav::Cdr< + tav::Find< predicate, - Eval<List<Branches...>> - >> - >> type; + tav::List<Branches...> + > + > type; }; } +template <typename... Branches> +using Cond = Eval<detail::Cond<Branches...>>; + +} + #endif // TYPEASVALUE_SRC_CONDITIONAL_COND_H_ |