24 #include <Eigen/Dense> 51 #define STATOR_AUTORETURN(EXPR) decltype(EXPR) { return EXPR; } 55 template<
typename Scalar,
size_t D1,
size_t D2>
using Matrix = Eigen::Matrix<Scalar, D1, D2, Eigen::DontAlign>;
68 static const int LAST_OVERLOAD_LVL = 10;
71 template<>
struct choice<LAST_OVERLOAD_LVL> {};
107 #define STATOR_AUTORETURN_BYVALUE(EXPR) STATOR_AUTORETURN(store(EXPR)) A class which recursively inherits from itself to allow ambiguous function definition ordering...
The lowest-priority overload level (closing the recursion)
choice< LAST_OVERLOAD_LVL > last_choice
#define STATOR_AUTORETURN(EXPR)
A convenience Macro for defining auto return type functions.
auto store_impl(T val, choice< 0 >) -> decltype(typename std::decay< decltype(std::declval< T >().eval())>::type(val))
The stator library namespace.
A class used to start the ambiguous function definition ordering calculation.
Eigen::Matrix< Scalar, D1, D2, Eigen::DontAlign > Matrix
A convenience typedef for a non-aligned Eigen Matrix.
Matrix< Scalar, D, 1 > Vector
A convenience typedef for a non-aligned Eigen Vector.
auto store(const T &val) -> decltype(store_impl(val, select_overload