Skip to content

Commit 15bd7a3

Browse files
committed
[Jenkins] auto-formatting by clang-format version 10.0.0-4ubuntu1
1 parent 69d29c5 commit 15bd7a3

1 file changed

Lines changed: 14 additions & 11 deletions

File tree

stan/math/prim/meta/forward_as.hpp

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,13 @@ inline T_actual&& forward_as(T_actual&& a) { // NOLINT
5454
* @return nothing, this always throws
5555
* @throw always throws std::runtime_error
5656
*/
57-
template <typename T_desired, typename T_actual,
58-
require_any_not_eigen_t<T_desired, T_actual>* = nullptr,
59-
typename = std::enable_if_t<
60-
!std::is_same<std::decay<T_actual>, std::decay<T_desired>>::value
61-
&& !(std::is_arithmetic_v<std::decay_t<T_desired>>
62-
&& std::is_arithmetic_v<std::decay_t<T_actual>>)>>
57+
template <
58+
typename T_desired, typename T_actual,
59+
require_any_not_eigen_t<T_desired, T_actual>* = nullptr,
60+
typename = std::enable_if_t<
61+
!std::is_same<std::decay<T_actual>, std::decay<T_desired>>::value
62+
&& !(std::is_arithmetic_v<std::decay_t<
63+
T_desired>> && std::is_arithmetic_v<std::decay_t<T_actual>>)>>
6364
inline T_desired forward_as(const T_actual& a) {
6465
throw std::runtime_error("Wrong type assumed! Please file a bug report.");
6566
}
@@ -79,11 +80,13 @@ inline T_desired forward_as(const T_actual& a) {
7980
* @param a input value
8081
* @return a
8182
*/
82-
template <typename T_desired, typename T_actual,
83-
typename = std::enable_if_t<
84-
!std::is_same_v<std::decay_t<T_actual>, std::decay_t<T_desired>>
85-
&& std::is_arithmetic_v<std::decay_t<T_desired>>
86-
&& std::is_arithmetic_v<std::decay_t<T_actual>>>>
83+
template <
84+
typename T_desired, typename T_actual,
85+
typename = std::enable_if_t<
86+
!std::is_same_v<
87+
std::decay_t<T_actual>,
88+
std::decay_t<
89+
T_desired>> && std::is_arithmetic_v<std::decay_t<T_desired>> && std::is_arithmetic_v<std::decay_t<T_actual>>>>
8790
inline T_desired forward_as(const T_actual& a) {
8891
return static_cast<T_desired>(a);
8992
}

0 commit comments

Comments
 (0)