diff options
author | Adrian Kummerlaender | 2015-02-26 19:06:34 +0100 |
---|---|---|
committer | Adrian Kummerlaender | 2015-02-26 19:06:34 +0100 |
commit | 34530d8532e22afe0026b956ae395ddc666351b3 (patch) | |
tree | ea3f2f99c8fe60f3a70213c0f1fa294aabff0237 /src/conditional | |
parent | e26621df352272688834361e7d026338cefb1372 (diff) | |
download | TypeAsValue-34530d8532e22afe0026b956ae395ddc666351b3.tar TypeAsValue-34530d8532e22afe0026b956ae395ddc666351b3.tar.gz TypeAsValue-34530d8532e22afe0026b956ae395ddc666351b3.tar.bz2 TypeAsValue-34530d8532e22afe0026b956ae395ddc666351b3.tar.lz TypeAsValue-34530d8532e22afe0026b956ae395ddc666351b3.tar.xz TypeAsValue-34530d8532e22afe0026b956ae395ddc666351b3.tar.zst TypeAsValue-34530d8532e22afe0026b956ae395ddc666351b3.zip |
Enabled `Concatenate` to concatenate a variadic pack of lists
* analogously to arbitrary list count concatenation in Scheme's `append`
** implemented for `Concatenate` instead as it fits better with the structure between `Append` and `Concatenate`
Diffstat (limited to 'src/conditional')
-rw-r--r-- | src/conditional/cond.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/conditional/cond.h b/src/conditional/cond.h index ca5e46d..4def611 100644 --- a/src/conditional/cond.h +++ b/src/conditional/cond.h @@ -9,12 +9,14 @@ namespace tav { namespace detail { -template <typename Pair> -using cond_predicate = IsTrue<Car<Pair>>; - template <typename... Branches> -struct select_cond_branch { - using type = Eval<detail::find_variadic<detail::cond_predicate, Branches...>>; +class select_cond_branch { + private: + template <typename Pair> + using predicate = IsTrue<Car<Pair>>; + + public: + using type = Eval<detail::find_variadic<predicate, Branches...>>; static_assert( IsPair<type>::value, |