Alexandria 2.31.0
SDC-CH common library for the Euclid project
Loading...
Searching...
No Matches
Functors.h
Go to the documentation of this file.
1
19#ifndef PYSTON_FUNCTORS_H
20#define PYSTON_FUNCTORS_H
21
22#include <cmath>
23
24namespace Pyston {
25
29template <typename T>
30struct Identity {
31 T operator()(T value) const {
32 return value;
33 }
34};
35
47template <typename R, typename T, R (*wrapped)(T)>
49 R operator()(T value) const {
50 return wrapped(value);
51 }
52};
53
65template <typename R, typename T, R (*wrapped)(T, T)>
67 R operator()(T left, T right) const {
68 return wrapped(left, right);
69 }
70};
71
73template <typename T>
75
77template <typename T>
79
81template <typename T>
83
85template <typename T>
87
89template <typename T>
91
93template <typename T>
95
97template <typename T>
99
101template <typename T>
103
105template <typename T>
107
109template <typename T>
111
113template <typename T>
115
117template <typename T>
119
121template <typename T>
123
125template <typename T>
127
129template <typename T>
131
133template <typename T>
135
137template <typename T>
139
141template <typename T>
143
145template <typename T>
147
149template <typename T>
151
153template <typename T>
155
157template <typename T>
159
161template <typename T>
163
164} // namespace Pyston
165
166#endif // PYSTON_FUNCTORS_H
R operator()(T left, T right) const
Definition Functors.h:67
T operator()(T value) const
Definition Functors.h:31
R operator()(T value) const
Definition Functors.h:49