|
4 | 4 | #include <stan/math/prim/fun/Eigen.hpp> |
5 | 5 | #include <stan/math/prim/meta/is_eigen.hpp> |
6 | 6 | #include <stan/math/prim/meta/is_complex.hpp> |
7 | | -#include <stan/math/prim/meta/is_tuple.hpp> |
8 | 7 | #include <stan/math/prim/meta/holder.hpp> |
9 | 8 | #include <stan/math/prim/meta/require_generics.hpp> |
10 | 9 | #include <stan/math/prim/meta/is_vector.hpp> |
11 | 10 | #include <stan/math/prim/meta/is_vector_like.hpp> |
12 | 11 | #include <stan/math/prim/meta/plain_type.hpp> |
13 | | -#include <tuple> |
14 | 12 | #include <utility> |
15 | 13 | #include <vector> |
16 | 14 |
|
@@ -208,36 +206,6 @@ struct apply_scalar_unary<F, T, require_std_vector_t<T>> { |
208 | 206 | } |
209 | 207 | }; |
210 | 208 |
|
211 | | -/** |
212 | | - * Template specialization for vectorized functions applying to |
213 | | - * tuple arguments. Each element of the tuple is processed |
214 | | - * recursively through apply_scalar_unary, allowing heterogeneous |
215 | | - * element types. |
216 | | - * |
217 | | - * @tparam F Type of function defining static apply function. |
218 | | - * @tparam T Tuple type. |
219 | | - */ |
220 | | -template <typename F, typename T> |
221 | | -struct apply_scalar_unary<F, T, require_tuple_t<T>> { |
222 | | - template <typename TT, size_t... Is> |
223 | | - static inline auto apply_impl(TT&& x, std::index_sequence<Is...>) { |
224 | | - return std::make_tuple( |
225 | | - apply_scalar_unary< |
226 | | - F, std::tuple_element_t<Is, std::decay_t<T>>>:: |
227 | | - apply(std::get<Is>(std::forward<TT>(x)))...); |
228 | | - } |
229 | | - |
230 | | - template <typename TT> |
231 | | - static inline auto apply(TT&& x) { |
232 | | - return apply_impl( |
233 | | - std::forward<TT>(x), |
234 | | - std::make_index_sequence<std::tuple_size_v<std::decay_t<T>>>()); |
235 | | - } |
236 | | - |
237 | | - using return_t = std::decay_t<decltype( |
238 | | - apply_scalar_unary<F, T>::apply(std::declval<T>()))>; |
239 | | -}; |
240 | | - |
241 | 209 | } // namespace math |
242 | 210 | } // namespace stan |
243 | 211 | #endif |
0 commit comments