Stan Math Library  2.11.0
reverse mode automatic differentiation
scalar_type_pre.hpp
Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_META_SCALAR_TYPE_PRE_HPP
2 #define STAN_MATH_PRIM_SCAL_META_SCALAR_TYPE_PRE_HPP
3 
6 
7 namespace stan {
8 
9  namespace {
10  template <bool is_vec, typename T, typename T_container>
11  struct scalar_type_helper_pre {
12  typedef T_container type;
13  };
14 
15  template <typename T, typename T_container>
16  struct scalar_type_helper_pre<true, T, T_container> {
17  typedef typename
18  scalar_type_helper_pre<is_vector<typename stan::math::value_type<T>::type>
19  ::value,
21  typename
23  type;
24  };
25  }
26 
33  template <typename T>
34  struct scalar_type_pre {
35  typedef typename
36  scalar_type_helper_pre<is_vector
37  <typename stan::math::value_type<T>::type>::value,
40  };
41 
42 
43 }
44 #endif
45 
scalar_type_helper_pre< is_vector< typename stan::math::value_type< T >::type >::value, typename stan::math::value_type< T >::type, T >::type type
Metaprogram structure to determine the type of first container of the base scalar type of a template ...
Primary template class for metaprogram to compute the type of values stored in a container.
Definition: value_type.hpp:18

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