Stan Math Library  2.20.0
reverse mode automatic differentiation
common_type.hpp
Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_ARR_FUN_COMMON_TYPE_HPP
2 #define STAN_MATH_PRIM_ARR_FUN_COMMON_TYPE_HPP
3 
6 #include <boost/math/tools/promotion.hpp>
7 #include <vector>
8 
9 namespace stan {
10 namespace math {
19 template <typename T1, typename T2>
20 struct common_type<std::vector<T1>, std::vector<T2> > {
21  typedef std::vector<typename common_type<T1, T2>::type> type;
22 };
23 
24 } // namespace math
25 } // namespace stan
26 
27 #endif
std::vector< typename common_type< T1, T2 >::type > type
Definition: common_type.hpp:21
Struct which calculates type promotion given two types.
Definition: common_type.hpp:25

     [ Stan Home Page ] © 2011–2018, Stan Development Team.