ROSE 0.11.145.192
Public Types | Static Public Member Functions | Static Public Attributes | List of all members
Rose::metaprog::List< Elements > Struct Template Reference

Description

template<typename... Elements>
struct Rose::metaprog::List< Elements >

A template list implementing a apply pattern (functor return void but does not have to be pure)

Template Parameters
Elementsvariadic to capture the list of type

Definition at line 79 of file metaprog.h.

Inheritance diagram for Rose::metaprog::List< Elements >:
Inheritance graph
[legend]
Collaboration diagram for Rose::metaprog::List< Elements >:
Collaboration graph
[legend]

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.
 

Member Typedef Documentation

◆ map_t

template<typename... Elements>
template<template< typename > class Functor>
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.

Template Parameters
Functora template of one type (list element) assign the result to type

Definition at line 98 of file metaprog.h.

◆ reduce_t

template<typename... Elements>
template<template< typename, typename > class Reducer>
using Rose::metaprog::List< Elements >::reduce_t = void

Reduce ...

Template Parameters
Reducer

Definition at line 106 of file metaprog.h.

◆ map_ravel_t

template<typename... Elements>
template<template< typename > class Functor>
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.

Template Parameters
Functora template of one type (list element) assign the result to list

Definition at line 114 of file metaprog.h.

◆ filter

template<typename... Elements>
template<template< typename > class Predicate>
using Rose::metaprog::List< Elements >::filter = List<>

Return the list of element for which Pred<E>::value == true.

Template Parameters
Predicatea template of one type (list element) assign the result to value

Definition at line 122 of file metaprog.h.

◆ at

template<typename... Elements>
template<size_t position>
using Rose::metaprog::List< Elements >::at = void

Return the element at the given position (void if out-of-bound)

Template Parameters
positionof the element to access

Definition at line 133 of file metaprog.h.

Member Function Documentation

◆ apply()

template<typename... Elements>
template<typename Functor , typename... Args>
static void Rose::metaprog::List< Elements >::apply ( Functor &&  functor,
Args &&...  args 
)
inlinestatic

Apply the given instance of Functor to each element of the list (in order)

Template Parameters
FunctorDo not use! deducted from first argument
ArgsDo not use! forwarded types of functor argments
Parameters
functoran instance of Functor
argsforwarded values of functor argments

Definition at line 90 of file metaprog.h.

Member Data Documentation

◆ length

template<typename... Elements>
constexpr size_t Rose::metaprog::List< Elements >::length {0}
staticconstexpr

Length of the list.

Definition at line 125 of file metaprog.h.


The documentation for this struct was generated from the following file: