Skip to content

Commit a42ab79

Browse files
committed
update rep_matrix test to decay return type and avoid bug with ADL lookup picking wrong function
1 parent 45bd042 commit a42ab79

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

test/unit/math/mix/fun/rep_matrix_test.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ TEST(MathMixMatFun, repMatrix) {
44
// y is scalar
55
auto f = [](int m, int n) {
66
return [=](const auto& y) {
7-
return stan::math::rep_matrix<decltype(y)>(y, m, n);
7+
return stan::math::rep_matrix<std::decay_t<decltype(y)>>(y, m, n);
88
};
99
};
1010

1111
// y is row vector or column vector
1212
auto g = [](int k) {
1313
return [=](const auto& y) {
14-
return stan::math::rep_matrix<decltype(y)>(y, k);
14+
return stan::math::rep_matrix<std::decay_t<decltype(y)>>(y, k);
1515
};
1616
};
1717

0 commit comments

Comments
 (0)