diff options
author | Adrian Kummerlaender | 2015-01-19 17:09:39 +0100 |
---|---|---|
committer | Adrian Kummerlaender | 2015-01-19 17:09:39 +0100 |
commit | 3cac56267edfbfd26e203ad674b9b8e74e44b14e (patch) | |
tree | 3ddc31c53d2976132f566b7fd382e9a924458bf7 /src/list/operation/basic.h | |
parent | 3c431f8a8eab25cdb1237f6a4e3ef6ac3f2b7479 (diff) | |
download | TypeAsValue-3cac56267edfbfd26e203ad674b9b8e74e44b14e.tar TypeAsValue-3cac56267edfbfd26e203ad674b9b8e74e44b14e.tar.gz TypeAsValue-3cac56267edfbfd26e203ad674b9b8e74e44b14e.tar.bz2 TypeAsValue-3cac56267edfbfd26e203ad674b9b8e74e44b14e.tar.lz TypeAsValue-3cac56267edfbfd26e203ad674b9b8e74e44b14e.tar.xz TypeAsValue-3cac56267edfbfd26e203ad674b9b8e74e44b14e.tar.zst TypeAsValue-3cac56267edfbfd26e203ad674b9b8e74e44b14e.zip |
Implemented `Filter` in terms of `Fold`
* as its name implies this _function_ only returns elements which evaluate to _true_ when passed to a given _function_
** this marks the moment where _TypeAsValue_ supports something _ConstList_ does not, i.e. primary goal is achieved
*** namely returning different types depending on the actual _values_ of a _Cons_ structure
* added appropriate test case
Diffstat (limited to 'src/list/operation/basic.h')
-rw-r--r-- | src/list/operation/basic.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/list/operation/basic.h b/src/list/operation/basic.h index 364a542..d80b347 100644 --- a/src/list/operation/basic.h +++ b/src/list/operation/basic.h @@ -13,12 +13,12 @@ class Length { typename, typename Previous > - struct Count { + struct count { typedef Add<Size<1>, Previous> type; }; public: - typedef typename Fold<Count, Size<0>, Cons>::type type; + typedef typename Fold<count, Size<0>, Cons>::type type; }; |