Automatic Differentiation
 
Loading...
Searching...
No Matches
append_return_type.hpp
Go to the documentation of this file.
1#ifndef STAN_MATH_PRIM_META_APPEND_RETURN_TYPE_HPP
2#define STAN_MATH_PRIM_META_APPEND_RETURN_TYPE_HPP
3
6#include <vector>
7
8namespace stan {
9namespace math {
21template <typename T1, typename T2>
24};
25
35template <>
36struct append_return_type<int, int> {
37 using type = int;
38};
39
54template <typename T1, typename T2, int R, int C>
55struct append_return_type<Eigen::Matrix<T1, R, C>, Eigen::Matrix<T2, R, C> > {
56 using type = typename Eigen::Matrix<return_type_t<T1, T2>, R, C>;
57};
58
70template <typename T1, typename T2>
71struct append_return_type<std::vector<T1>, std::vector<T2> > {
72 using type = typename std::vector<typename append_return_type<T1, T2>::type>;
73};
74} // namespace math
75} // namespace stan
76#endif
typename return_type< Ts... >::type return_type_t
Convenience type for the return type of the specified template parameters.
(Expert) Numerical traits for algorithmic differentiation variables.
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...
STL namespace.
typename std::vector< typename append_return_type< T1, T2 >::type > type
This template metaprogram is used to compute the return type for append_array.