ROSE 0.11.145.147
|
A template list implementing a apply
pattern (functor return void but does not have to be pure)
Elements | variadic to capture the list of type |
Definition at line 79 of file metaprog.h.
Public Types | |
template<template< typename > class Functor> | |
using | map_t = List<> |
Map Functor to each element of the list and return a list. | |
template<template< typename, typename > class Reducer> | |
using | reduce_t = void |
Reduce ... | |
template<template< typename > class Functor> | |
using | map_ravel_t = List<> |
Map Functor to each element of the list and return a list. | |
template<template< typename > class Predicate> | |
using | filter = List<> |
Return the list of element for which Pred<E>::value == true. | |
template<size_t position> | |
using | at = void |
Return the element at the given position (void if out-of-bound) | |
Public Types inherited from Rose::metaprog::list_base_t< Elements... > | |
using | append_ravel = typename L::template prepend< Elements... > |
using | prepend_ravel = typename L::template append< Elements... > |
using | append = List< Elements..., Es... > |
using | prepend = List< Es..., Elements... > |
Static Public Member Functions | |
template<typename Functor , typename... Args> | |
static void | apply (Functor &&functor, Args &&... args) |
Apply the given instance of Functor to each element of the list (in order) | |
Static Public Attributes | |
static constexpr size_t | length {0} |
Length of the list. | |
using Rose::metaprog::List< Elements >::map_t = List<> |
Map Functor to each element of the list and return a list.
Functor return a list element.
Functor | a template of one type (list element) assign the result to type |
Definition at line 98 of file metaprog.h.
using Rose::metaprog::List< Elements >::reduce_t = void |
using Rose::metaprog::List< Elements >::map_ravel_t = List<> |
Map Functor to each element of the list and return a list.
Functor return a list.
Functor | a template of one type (list element) assign the result to list |
Definition at line 114 of file metaprog.h.
using Rose::metaprog::List< Elements >::filter = List<> |
Return the list of element for which Pred<E>::value == true.
Predicate | a template of one type (list element) assign the result to value |
Definition at line 122 of file metaprog.h.
using Rose::metaprog::List< Elements >::at = void |
Return the element at the given position (void if out-of-bound)
position | of the element to access |
Definition at line 133 of file metaprog.h.
|
inlinestatic |
Apply the given instance of Functor to each element of the list (in order)
Functor | Do not use! deducted from first argument |
Args | Do not use! forwarded types of functor argments |
functor | an instance of Functor |
args | forwarded values of functor argments |
Definition at line 90 of file metaprog.h.
|
staticconstexpr |
Length of the list.
Definition at line 125 of file metaprog.h.