Loading...
Searching...
No Matches
Dune::ReduceTuple< F, Tuple, Seed, N > Struct Template Reference
Common » Utilities » Tuple Utilities

Apply reduce with meta binary function to template. More...

`#include <dune/common/tupleutility.hh>`

Inheritance diagram for Dune::ReduceTuple< F, Tuple, Seed, N >:

## Public Types

typedef ReduceTuple< F, Tuple, Seed, N-1 >::type | Accumulated
typedef std::tuple_element< N-1, Tuple >::type | Value
typedef F< Accumulated, Value >::type | type
| Result of the reduce operation.

## Detailed Description

template<template< class, class > class F, class Tuple, class Seed = std::tuple<>, int N = std::tuple_size<Tuple>::value>
struct Dune::ReduceTuple< F, Tuple, Seed, N >

Apply reduce with meta binary function to template.

For a tuple<T0,T1,...,TN-1,TN,...> the exported result is

F< ... F< F< F<Seed,T0>::type, T1>::type, T2>::type, ... TN-1>::type

Template Parameters

  F | Binary meta function
  Tuple | Apply reduce operation to this std::tuple
  Seed | Initial value for reduce operation
  N | Reduce the first N std::tuple elements

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

- tupleutility.hh