Skip to content

Commit 0b7c7ef

Browse files
committed
Remove reference capture
1 parent c662fbd commit 0b7c7ef

28 files changed

Lines changed: 29 additions & 29 deletions

stan/math/prim/fun/bessel_first_kind.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ template <typename T1, typename T2, require_any_container_t<T1, T2>* = nullptr,
5555
require_not_var_matrix_t<T2>* = nullptr>
5656
inline auto bessel_first_kind(const T1& a, const T2& b) {
5757
return apply_scalar_binary(
58-
[&](const auto& c, const auto& d) { return bessel_first_kind(c, d); },
58+
[](const auto& c, const auto& d) { return bessel_first_kind(c, d); },
5959
a, b);
6060
}
6161

stan/math/prim/fun/bessel_second_kind.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ inline T2 bessel_second_kind(int v, const T2 z) {
5555
template <typename T1, typename T2, require_any_container_t<T1, T2>* = nullptr>
5656
inline auto bessel_second_kind(const T1& a, const T2& b) {
5757
return apply_scalar_binary(
58-
[&](const auto& c, const auto& d) { return bessel_second_kind(c, d); },
58+
[](const auto& c, const auto& d) { return bessel_second_kind(c, d); },
5959
a, b);
6060
}
6161

stan/math/prim/fun/binary_log_loss.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ template <typename T1, typename T2, require_any_container_t<T1, T2>* = nullptr,
4646
require_not_var_matrix_t<T2>* = nullptr>
4747
inline auto binary_log_loss(const T1& a, const T2& b) {
4848
return apply_scalar_binary(
49-
[&](const auto& c, const auto& d) { return binary_log_loss(c, d); },
49+
[](const auto& c, const auto& d) { return binary_log_loss(c, d); },
5050
a, b);
5151
}
5252

stan/math/prim/fun/binomial_coefficient_log.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ inline return_type_t<T_n, T_k> binomial_coefficient_log(const T_n n,
163163
template <typename T1, typename T2, require_any_container_t<T1, T2>* = nullptr>
164164
inline auto binomial_coefficient_log(const T1& a, const T2& b) {
165165
return apply_scalar_binary(
166-
[&](const auto& c, const auto& d) { return binomial_coefficient_log(c, d); },
166+
[](const auto& c, const auto& d) { return binomial_coefficient_log(c, d); },
167167
a, b);
168168
}
169169

stan/math/prim/fun/choose.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ inline int choose(int n, int k) {
5151
template <typename T1, typename T2, require_any_container_t<T1, T2>* = nullptr>
5252
inline auto choose(const T1& a, const T2& b) {
5353
return apply_scalar_binary(
54-
[&](const auto& c, const auto& d) { return choose(c, d); }, a, b);
54+
[](const auto& c, const auto& d) { return choose(c, d); }, a, b);
5555
}
5656

5757
} // namespace math

stan/math/prim/fun/falling_factorial.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ template <typename T1, typename T2, require_any_container_t<T1, T2>* = nullptr,
8282
require_all_not_var_matrix_t<T1, T2>* = nullptr>
8383
inline auto falling_factorial(const T1& a, const T2& b) {
8484
return apply_scalar_binary(
85-
[&](const auto& c, const auto& d) { return falling_factorial(c, d); },
85+
[](const auto& c, const auto& d) { return falling_factorial(c, d); },
8686
a, b);
8787
}
8888

stan/math/prim/fun/fdim.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ inline double fdim(T1 x, T2 y) {
3737
template <typename T1, typename T2, require_any_container_t<T1, T2>* = nullptr>
3838
inline auto fdim(const T1& a, const T2& b) {
3939
return apply_scalar_binary(
40-
[&](const auto& c, const auto& d) { return fdim(c, d); }, a, b);
40+
[](const auto& c, const auto& d) { return fdim(c, d); }, a, b);
4141
}
4242

4343
} // namespace math

stan/math/prim/fun/fmax.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ inline double fmax(T1 x, T2 y) {
3535
template <typename T1, typename T2, require_any_container_t<T1, T2>* = nullptr>
3636
inline auto fmax(const T1& a, const T2& b) {
3737
return apply_scalar_binary(
38-
[&](const auto& c, const auto& d) { return fmax(c, d); }, a, b);
38+
[](const auto& c, const auto& d) { return fmax(c, d); }, a, b);
3939
}
4040

4141
} // namespace math

stan/math/prim/fun/fmin.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ inline double fmin(T1 x, T2 y) {
3535
template <typename T1, typename T2, require_any_container_t<T1, T2>* = nullptr>
3636
inline auto fmin(const T1& a, const T2& b) {
3737
return apply_scalar_binary(
38-
[&](const auto& c, const auto& d) { return fmin(c, d); }, a, b);
38+
[](const auto& c, const auto& d) { return fmin(c, d); }, a, b);
3939
}
4040

4141
} // namespace math

stan/math/prim/fun/fmod.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ inline double fmod(const T1& a, const T2& b) {
3535
*/
3636
template <typename T1, typename T2, require_any_container_t<T1, T2>* = nullptr>
3737
inline auto fmod(const T1& a, const T2& b) {
38-
return apply_scalar_binary([&](const auto& c, const auto& d) {
38+
return apply_scalar_binary([](const auto& c, const auto& d) {
3939
using std::fmod;
4040
return fmod(c, d);
4141
}, a, b);

0 commit comments

Comments
 (0)