From 218c37beb4dbc701938da71acf0bd3914f34f89e Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Wed, 31 Aug 2016 15:45:25 +0200 Subject: 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). --- Eigen/src/Core/Random.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'Eigen/src/Core/Random.h') 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 struct scalar_random_op { EIGEN_EMPTY_STRUCT_CTOR(scalar_random_op) - template - inline const Scalar operator() (Index, Index = 0) const { return random(); } + inline const Scalar operator() () const { return random(); } }; template -- cgit v1.2.3