From 46e174935b122c0da4b51532a7f683a512eeaf65 Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Sun, 15 Feb 2015 14:07:50 +0100 Subject: Moved class-based implementations into `detail` namespace * while class templates enable e.g. hiding implementation details they also require evaluation via `Eval` ** this clutters up the actual logic and is now hidden behind aliae that perform the evaluation --- src/conditional/cond.h | 19 +++++++++++++------ src/conditional/if.h | 4 ++-- 2 files changed, 15 insertions(+), 8 deletions(-) (limited to 'src/conditional') 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 class Cond { private: template - using predicate = IsTrue>>>; + using predicate = IsTrue>; public: - typedef Eval> - >> - >> type; + tav::List + > + > type; }; } +template +using Cond = Eval>; + +} + #endif // TYPEASVALUE_SRC_CONDITIONAL_COND_H_ diff --git a/src/conditional/if.h b/src/conditional/if.h index b99f399..9be1a50 100644 --- a/src/conditional/if.h +++ b/src/conditional/if.h @@ -10,11 +10,11 @@ template < typename TrueBranch, typename FalseBranch > -using If = std::conditional< +using If = Eval; +>>; } -- cgit v1.2.3