Stan Math Library  2.20.0
reverse mode automatic differentiation
return_type.hpp
Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_META_RETURN_TYPE_HPP
2 #define STAN_MATH_PRIM_SCAL_META_RETURN_TYPE_HPP
3 
5 #include <boost/math/tools/promotion.hpp>
6 
7 namespace stan {
8 
32 template <typename T, typename... Types_pack>
33 struct return_type {
34  typedef typename boost::math::tools::promote_args<
35  double, typename scalar_type<T>::type,
36  typename return_type<Types_pack...>::type>::type type;
37 };
38 
39 template <typename T>
40 struct return_type<T> {
41  typedef typename boost::math::tools::promote_args<
42  double, typename scalar_type<T>::type>::type type;
43 };
44 
45 } // namespace stan
46 #endif
Template metaprogram to calculate the base scalar return type resulting from promoting all the scalar...
Definition: return_type.hpp:33
boost::math::tools::promote_args< double, typename scalar_type< T >::type >::type type
Definition: return_type.hpp:42
boost::math::tools::promote_args< double, typename scalar_type< T >::type, typename return_type< Types_pack... >::type >::type type
Definition: return_type.hpp:36

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