functional.hpp File Reference
#include <functional>

Go to the source code of this file.

Namespaces

 atria
 C++ amazing templates and reusable implementations awesomeness.
 
 atria::estd
 C++11 compatible implementations of some C++14 and beyond standard library components.
 

Macros

#define ABL_DEFINE_CPP14_OPERATOR_1(name, op)
 
#define ABL_DEFINE_CPP14_OPERATOR_2(name, op)
 
#define ABL_ESTD_FUNCTIONAL_DECLTYPE_RETURN(body_expr)   decltype(body_expr) { return (body_expr); }
 

Macro Definition Documentation

#define ABL_DEFINE_CPP14_OPERATOR_1 (   name,
  op 
)
Value:
template <typename T = void> \
struct name { \
using argument_type = T; \
using result_type = T; \
T operator() (const T& a) \
{ \
return op a; \
} \
}; \
\
template <> \
struct name<void> \
{ \
template <typename T, typename U> \
auto operator() (const T& a) const \
-> decltype(op a) \
{ \
return op a; \
} \
}; \

Definition at line 34 of file functional.hpp.

#define ABL_DEFINE_CPP14_OPERATOR_2 (   name,
  op 
)
Value:
template <typename T = void> \
struct name : std::name<T> {}; \
template <> \
struct name<void> \
{ \
template <typename T, typename U> \
auto operator() (const T& a, const U& b) const \
-> decltype(a op b) \
{ \
return a op b; \
} \
}; \

Definition at line 57 of file functional.hpp.

Fork me on GitHub