Automatic Differentiation
 
Loading...
Searching...
No Matches
base_type.hpp
Go to the documentation of this file.
1#ifndef STAN_MATH_PRIM_META_BASE_TYPE_HPP
2#define STAN_MATH_PRIM_META_BASE_TYPE_HPP
3
8#include <type_traits>
9#include <vector>
10
11namespace stan {
12
23template <typename T, typename = void>
24struct base_type {
25 using type = std::decay_t<T>;
26};
27
28template <typename T>
30
38template <typename T>
39struct base_type<T, std::enable_if_t<is_std_vector<T>::value>> {
41};
42
50template <typename T>
51struct base_type<T, std::enable_if_t<is_eigen<T>::value>> {
53};
54
55} // namespace stan
56#endif
typename base_type< T >::type base_type_t
Definition base_type.hpp:29
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...
STL namespace.
base_type_t< typename std::decay_t< T >::Scalar > type
Definition base_type.hpp:52
base_type_t< typename std::decay_t< T >::value_type > type
Definition base_type.hpp:40
std::decay_t< T > type
Definition base_type.hpp:25
Metaprogram structure to determine the base base type of a template argument.
Definition base_type.hpp:24