@@ -23,8 +23,8 @@ namespace math {
23
23
* @param c scalar
24
24
* @return product of matrix and scalar
25
25
*/
26
- template <typename Mat, typename Scal, typename = require_eigen_t <Mat>,
27
- typename = require_stan_scalar_t <Scal>>
26
+ template <typename Mat, typename Scal, require_eigen_t <Mat>* = nullptr ,
27
+ require_stan_scalar_t <Scal>* = nullptr >
28
28
inline auto multiply (const Mat& m, Scal c) {
29
29
return (c * m).eval ();
30
30
}
@@ -39,8 +39,8 @@ inline auto multiply(const Mat& m, Scal c) {
39
39
* @param m matrix
40
40
* @return product of scalar and matrix
41
41
*/
42
- template <typename Scal, typename Mat, typename = require_stan_scalar_t <Scal>,
43
- typename = require_eigen_t <Mat>>
42
+ template <typename Scal, typename Mat, require_stan_scalar_t <Scal>* = nullptr ,
43
+ require_eigen_t <Mat>* = nullptr >
44
44
inline auto multiply (Scal c, const Mat& m) {
45
45
return (c * m).eval ();
46
46
}
@@ -60,10 +60,10 @@ inline auto multiply(Scal c, const Mat& m) {
60
60
* not match the number of rows of m2.
61
61
*/
62
62
template <typename Mat1, typename Mat2,
63
- typename = require_all_eigen_vt<std::is_arithmetic, Mat1, Mat2>,
64
- typename = require_any_not_same_t <double , value_type_t <Mat1>,
65
- value_type_t <Mat2>>,
66
- typename = require_not_eigen_row_and_col_t <Mat1, Mat2>>
63
+ require_all_eigen_vt<std::is_arithmetic, Mat1, Mat2>* = nullptr ,
64
+ require_any_not_same_t <double , value_type_t <Mat1>,
65
+ value_type_t <Mat2>>* = nullptr ,
66
+ require_not_eigen_row_and_col_t <Mat1, Mat2>* = nullptr >
67
67
inline auto multiply (const Mat1& m1, const Mat2& m2) {
68
68
check_size_match (" multiply" , " Columns of m1" , m1.cols (), " Rows of m2" ,
69
69
m2.rows ());
@@ -86,10 +86,10 @@ inline auto multiply(const Mat1& m1, const Mat2& m2) {
86
86
* not match the number of rows of m2.
87
87
*/
88
88
template <typename Mat1, typename Mat2,
89
- typename = require_all_eigen_t <Mat1, Mat2>,
90
- typename
91
- = require_all_same_t < double , value_type_t <Mat1>, value_type_t <Mat2>>,
92
- typename = require_not_eigen_row_and_col_t <Mat1, Mat2>>
89
+ require_all_eigen_t <Mat1, Mat2>* = nullptr ,
90
+ require_all_same_t < double , value_type_t <Mat1>,
91
+ value_type_t <Mat2>>* = nullptr ,
92
+ require_not_eigen_row_and_col_t <Mat1, Mat2>* = nullptr >
93
93
inline auto multiply (const Mat1& m1, const Mat2& m2)
94
94
-> decltype((m1 * m2).eval()) {
95
95
check_size_match (" multiply" , " Columns of m1" , m1.cols (), " Rows of m2" ,
@@ -124,9 +124,9 @@ inline auto multiply(const Mat1& m1, const Mat2& m2)
124
124
* @throw <code>std::invalid_argument</code> if rv and v are not the same size
125
125
*/
126
126
template <typename RowVec, typename ColVec,
127
- typename
128
- = require_all_not_var_t < scalar_type_t <RowVec>, scalar_type_t <ColVec>>,
129
- typename = require_eigen_row_and_col_t <RowVec, ColVec>>
127
+ require_all_not_var_t < scalar_type_t <RowVec>,
128
+ scalar_type_t <ColVec>>* = nullptr ,
129
+ require_eigen_row_and_col_t <RowVec, ColVec>* = nullptr >
130
130
inline auto multiply (const RowVec& rv, const ColVec& v) {
131
131
check_matching_sizes (" multiply" , " rv" , rv, " v" , v);
132
132
return dot_product (rv, v);
@@ -142,7 +142,7 @@ inline auto multiply(const RowVec& rv, const ColVec& v) {
142
142
* @return product
143
143
*/
144
144
template <typename Scalar1, typename Scalar2,
145
- typename = require_all_stan_scalar_t <Scalar1, Scalar2>>
145
+ require_all_stan_scalar_t <Scalar1, Scalar2>* = nullptr >
146
146
inline return_type_t <Scalar1, Scalar2> multiply (Scalar1 m, Scalar2 c) {
147
147
return c * m;
148
148
}
0 commit comments