Skip to content

Commit 3595599

Browse files
authored
Merge pull request #2631 from stan-dev/fix/value_of_rec-varmat
update value_of_rec to return a reference for varmat types
2 parents 681fa17 + 620158b commit 3595599

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

stan/math/rev/fun/value_of_rec.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ namespace math {
1414
* @return Value of variable.
1515
*/
1616
template <typename T>
17-
inline auto value_of_rec(const var_value<T>& v) {
17+
inline auto& value_of_rec(const var_value<T>& v) {
1818
return v.vi_->val_;
1919
}
2020

0 commit comments

Comments
 (0)