Stan
2.5.0
probability, sampling & optimization
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
src
stan
math
functions
promote_scalar_type.hpp
Go to the documentation of this file.
1
#ifndef STAN__MATH__FUNCTIONS__PROMOTE_SCALAR_TYPE_HPP
2
#define STAN__MATH__FUNCTIONS__PROMOTE_SCALAR_TYPE_HPP
3
4
#include <vector>
5
6
namespace
stan {
7
8
namespace
math {
9
10
18
template
<
typename
T,
typename
S>
19
struct
promote_scalar_type
{
20
24
typedef
T
type
;
25
26
};
27
28
37
template
<
typename
T,
typename
S>
38
struct
promote_scalar_type
<T, std::vector<S> > {
39
43
typedef
std::vector<typename promote_scalar_type<T,S>::type>
type
;
44
45
};
46
47
48
}
49
50
}
51
52
#endif
stan::math::promote_scalar_type
Template metaprogram to calculate a type for converting a convertible type.
Definition:
promote_scalar_type.hpp:19
stan::math::promote_scalar_type::type
T type
The promoted type.
Definition:
promote_scalar_type.hpp:24
stan::math::promote_scalar_type< T, std::vector< S > >::type
std::vector< typename promote_scalar_type< T, S >::type > type
The promoted type.
Definition:
promote_scalar_type.hpp:43
[
Stan Home Page
]
© 2011–2014, Stan Development Team.