Skip to content

Commit 535f0cb

Browse files
committed
replace omitted require_container_t
1 parent 238420e commit 535f0cb

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

stan/math/prim/fun/norm1.hpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ namespace math {
1616
* @param v Vector.
1717
* @return L1 norm of v.
1818
*/
19-
template <typename Container, require_st_arithmetic<Container>* = nullptr>
19+
template <typename Container, require_st_arithmetic<Container>* = nullptr,
20+
require_container_t<Container>* = nullptr>
2021
inline auto norm1(const Container& x) {
2122
return apply_vector_unary<ref_type_t<Container>>::reduce(
2223
to_ref(x), [](const auto& v) { return v.template lpNorm<1>(); });

stan/math/prim/fun/norm2.hpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ namespace math {
1616
* @param v Vector.
1717
* @return L2 norm of v.
1818
*/
19-
template <typename Container, require_st_arithmetic<Container>* = nullptr>
19+
template <typename Container, require_st_arithmetic<Container>* = nullptr,
20+
require_container_t<Container>* = nullptr>
2021
inline auto norm2(const Container& x) {
2122
return apply_vector_unary<ref_type_t<Container>>::reduce(
2223
to_ref(x), [](const auto& v) { return v.template lpNorm<2>(); });

0 commit comments

Comments
 (0)