Go to the source code of this file.
◆ _RHEOLEF_generic_unary_syntax_functor
#define _RHEOLEF_generic_unary_syntax_functor |
( |
|
OP, |
|
|
|
NAME |
|
) |
| |
Value:template <typename T = void> \
struct NAME; \
\
template <typename T> \
struct NAME: public std::unary_function<T, T> { \
T operator() (
const T& x)
const {
return OP x; } \
}; \
\
template<> \
struct NAME<void> { \
template <typename T> \
auto operator() (
T&& x) const \
noexcept (noexcept (OP std::forward<T>(x))) \
-> decltype(OP std::forward<T>(x)) \
{ return OP std::forward<T>(x); } \
};
Definition at line 37 of file expr_utilities.h.
◆ _RHEOLEF_generic_binary_syntax_functor
#define _RHEOLEF_generic_binary_syntax_functor |
( |
|
OP, |
|
|
|
NAME |
|
) |
| |
Value:template <typename T = void> \
struct NAME; \
\
template<typename T> \
struct NAME: public std::binary_function<T, T, T> { \
T operator() (
const T& x,
const T& y)
const {
return x OP y; } \
}; \
\
template<> \
struct NAME<void> { \
template <typename T, typename U> \
auto operator() (
T&& t, U&& y) const \
noexcept (noexcept (std::forward<T>(t) OP std::forward<U>(y))) \
-> decltype(std::forward<T>(t) OP std::forward<U>(y)) \
{ return std::forward<T>(t) OP std::forward<U>(y); } \
};
Definition at line 55 of file expr_utilities.h.