diff options
author | Gael Guennebaud <g.gael@free.fr> | 2016-08-31 15:45:25 +0200 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2016-08-31 15:45:25 +0200 |
commit | 218c37beb4dbc701938da71acf0bd3914f34f89e (patch) | |
tree | 1d8596ef23fcbf9abc87ce9f41ea0567b8d0d486 /Eigen/src/Core/Random.h | |
parent | efe2c225c9bbd54b51c97d29e86917293a6091f4 (diff) |
bug #1286: automatically detect the available prototypes of functors passed to CwiseNullaryExpr such that functors have only to implement the operators that matters among:
operator()()
operator()(i)
operator()(i,j)
Linear access is also automatically detected based on the availability of operator()(i,j).
Diffstat (limited to 'Eigen/src/Core/Random.h')
-rw-r--r-- | Eigen/src/Core/Random.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Eigen/src/Core/Random.h b/Eigen/src/Core/Random.h index 02038e9e3..6faf789c7 100644 --- a/Eigen/src/Core/Random.h +++ b/Eigen/src/Core/Random.h @@ -16,8 +16,7 @@ namespace internal { template<typename Scalar> struct scalar_random_op { EIGEN_EMPTY_STRUCT_CTOR(scalar_random_op) - template<typename Index> - inline const Scalar operator() (Index, Index = 0) const { return random<Scalar>(); } + inline const Scalar operator() () const { return random<Scalar>(); } }; template<typename Scalar> |