Stan Math Library  2.8.0
reverse mode automatic differentiation
 All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
promote_scalar_type.hpp
Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_PROMOTE_SCALAR_TYPE_HPP
2 #define STAN_MATH_PRIM_SCAL_FUN_PROMOTE_SCALAR_TYPE_HPP
3 
4 #include <vector>
5 
6 namespace stan {
7 
8  namespace math {
9 
10 
18  template <typename T, typename S>
23  typedef T type;
24  };
25 
26 
35  template <typename T, typename S>
36  struct promote_scalar_type<T, std::vector<S> > {
40  typedef std::vector<typename promote_scalar_type<T, S>::type> type;
41  };
42 
43 
44  }
45 
46 }
47 
48 #endif
Template metaprogram to calculate a type for converting a convertible type.
std::vector< typename promote_scalar_type< T, S >::type > type
The promoted type.

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