Tatooine
map.h
Go to the documentation of this file.
1#ifndef TATOOINE_MAP_H
2#define TATOOINE_MAP_H
3//==============================================================================
4#include <functional>
5//==============================================================================
6namespace tatooine {
7//==============================================================================
9template <typename... Ts, typename F>
10auto constexpr map(F&& f, Ts&&... ts) {
11 (f(std::forward<Ts>(ts)), ...);
12}
13//==============================================================================
14} // namespace tatooine
15//==============================================================================
16#endif
Definition: algorithm.h:6
auto constexpr map(F &&f, Ts &&... ts)
maps unary function f to all single parameters of parameter pack ts
Definition: map.h:10