Stan Math Library  2.20.0
reverse mode automatic differentiation
scalar_type.hpp
Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_META_SCALAR_TYPE_HPP
2 #define STAN_MATH_PRIM_SCAL_META_SCALAR_TYPE_HPP
3 
5 
6 namespace stan {
15 template <typename T>
16 struct scalar_type {
17  typedef T type;
18 };
19 
20 template <typename T>
21 struct scalar_type<T*> {
22  typedef typename scalar_type<T>::type type;
23 };
24 
25 } // namespace stan
26 #endif
scalar_type< T >::type type
Definition: scalar_type.hpp:22
Metaprogram structure to determine the base scalar type of a template argument.
Definition: scalar_type.hpp:16

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