Skip to content

Commit 39cf128

Browse files
committed
reordered stan_print definitions
1 parent f448c13 commit 39cf128

1 file changed

Lines changed: 12 additions & 12 deletions

File tree

stan/math/prim/fun/stan_print.hpp

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,6 @@ void stan_print(std::ostream* o, const T& x) {
1414
*o << x;
1515
}
1616

17-
template <typename T>
18-
void stan_print(std::ostream* o, const std::vector<T>& x) {
19-
*o << '[';
20-
for (size_t i = 0; i < x.size(); ++i) {
21-
if (i > 0) {
22-
*o << ',';
23-
}
24-
stan_print(o, x[i]);
25-
}
26-
*o << ']';
27-
}
28-
2917
template <typename EigVec, require_eigen_vector_t<EigVec>* = nullptr>
3018
void stan_print(std::ostream* o, const EigVec& x) {
3119
*o << '[';
@@ -58,6 +46,18 @@ void stan_print(std::ostream* o, const EigMat& x) {
5846
*o << ']';
5947
}
6048

49+
template <typename T>
50+
void stan_print(std::ostream* o, const std::vector<T>& x) {
51+
*o << '[';
52+
for (size_t i = 0; i < x.size(); ++i) {
53+
if (i > 0) {
54+
*o << ',';
55+
}
56+
stan_print(o, x[i]);
57+
}
58+
*o << ']';
59+
}
60+
6161
} // namespace math
6262
} // namespace stan
6363
#endif

0 commit comments

Comments
 (0)