@@ -185,8 +185,8 @@ template <typename T, typename M, typename S, typename Lp,
185185inline auto offset_multiplier_constrain (const std::vector<T>& x, const M& mu,
186186 const std::vector<S>& sigma, Lp& lp) {
187187 check_matching_dims (" offset_multiplier_constrain" , " x" , x, " sigma" , sigma);
188- std::vector<plain_type_t <decltype (
189- offset_multiplier_constrain (x[ 0 ], mu, sigma[0 ], lp))>>
188+ std::vector<plain_type_t <decltype (offset_multiplier_constrain (x[ 0 ], mu,
189+ sigma[0 ], lp))>>
190190 ret;
191191 ret.reserve (x.size ());
192192 const auto & mu_ref = to_ref (mu);
@@ -226,8 +226,8 @@ inline auto offset_multiplier_constrain(const std::vector<T>& x,
226226 const std::vector<M>& mu,
227227 const S& sigma, Lp& lp) {
228228 check_matching_dims (" offset_multiplier_constrain" , " x" , x, " mu" , mu);
229- std::vector<plain_type_t <decltype (
230- offset_multiplier_constrain (x[ 0 ], mu[ 0 ], sigma, lp))>>
229+ std::vector<plain_type_t <decltype (offset_multiplier_constrain (x[ 0 ], mu[ 0 ],
230+ sigma, lp))>>
231231 ret;
232232 ret.reserve (x.size ());
233233 const auto & sigma_ref = to_ref (sigma);
@@ -246,8 +246,8 @@ inline auto offset_multiplier_constrain(const std::vector<T>& x,
246246 const std::vector<S>& sigma) {
247247 check_matching_dims (" offset_multiplier_constrain" , " x" , x, " mu" , mu);
248248 check_matching_dims (" offset_multiplier_constrain" , " x" , x, " sigma" , sigma);
249- std::vector<plain_type_t <decltype (
250- offset_multiplier_constrain (x[ 0 ], mu[ 0 ], sigma[0 ]))>>
249+ std::vector<plain_type_t <decltype (offset_multiplier_constrain (x[ 0 ], mu[ 0 ],
250+ sigma[0 ]))>>
251251 ret;
252252 ret.reserve (x.size ());
253253 for (size_t i = 0 ; i < x.size (); ++i) {
@@ -266,8 +266,8 @@ inline auto offset_multiplier_constrain(const std::vector<T>& x,
266266 const std::vector<S>& sigma, Lp& lp) {
267267 check_matching_dims (" offset_multiplier_constrain" , " x" , x, " mu" , mu);
268268 check_matching_dims (" offset_multiplier_constrain" , " x" , x, " sigma" , sigma);
269- std::vector<plain_type_t <decltype (
270- offset_multiplier_constrain (x[ 0 ], mu[ 0 ], sigma[0 ], lp))>>
269+ std::vector<plain_type_t <decltype (offset_multiplier_constrain (x[ 0 ], mu[ 0 ],
270+ sigma[0 ], lp))>>
271271 ret;
272272 ret.reserve (x.size ());
273273 for (size_t i = 0 ; i < x.size (); ++i) {
@@ -305,7 +305,7 @@ template <bool Jacobian, typename T, typename M, typename S, typename Lp,
305305 require_convertible_t <return_type_t <T, M, S>, Lp>* = nullptr >
306306inline auto offset_multiplier_constrain (const T& x, const M& mu, const S& sigma,
307307 Lp& lp) {
308- if (Jacobian) {
308+ if constexpr (Jacobian) {
309309 return offset_multiplier_constrain (x, mu, sigma, lp);
310310 } else {
311311 return offset_multiplier_constrain (x, mu, sigma);
0 commit comments