From a59df7e8c4fd1f88bc1078ebcfde944502b0c309 Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Sun, 15 Feb 2015 22:37:06 +0100 Subject: Simplified `Cond`, `Cons` and `Map` implementations * continuation of 8e49cc6f8f --- src/list/cons.h | 28 ++-------------------------- 1 file changed, 2 insertions(+), 26 deletions(-) (limited to 'src/list/cons.h') diff --git a/src/list/cons.h b/src/list/cons.h index 95783b2..dbd4c0b 100644 --- a/src/list/cons.h +++ b/src/list/cons.h @@ -5,30 +5,6 @@ namespace tav { -namespace detail { - -template -struct Car { - static_assert( - IsPair::value, - "Pair type required" - ); - - typedef typename Pair::car type; -}; - -template -struct Cdr { - static_assert( - IsPair::value, - "Pair type required" - ); - - typedef typename Pair::cdr type; -}; - -} - template < typename CAR, typename CDR @@ -36,10 +12,10 @@ template < using Cons = Pair; template -using Car = Eval>; +using Car = typename Pair::car; template -using Cdr = Eval>; +using Cdr = typename Pair::cdr; } -- cgit v1.2.3