Stan Math Library
2.20.0
reverse mode automatic differentiation
stan
math
prim
scal
meta
is_constant.hpp
Go to the documentation of this file.
1
#ifndef STAN_MATH_PRIM_SCAL_META_IS_CONSTANT_HPP
2
#define STAN_MATH_PRIM_SCAL_META_IS_CONSTANT_HPP
3
4
#include <
stan/math/prim/scal/meta/conjunction.hpp
>
5
#include <type_traits>
6
7
namespace
stan
{
8
22
template
<
typename
T>
23
struct
is_constant
{
28
enum
{
value
= std::is_convertible<T, double>::value };
29
};
30
37
template
<
typename
... T>
38
using
is_constant_all
=
math::conjunction<is_constant<T>
...>;
39
40
}
// namespace stan
41
#endif
stan::is_constant
Metaprogramming struct to detect whether a given type is constant in the mathematical sense (not the ...
Definition:
is_constant.hpp:23
stan
Definition:
log_sum_exp.hpp:8
stan::math::conjunction
Extends std::true_type when instantiated with zero or more template parameters, all of which extend t...
Definition:
conjunction.hpp:14
conjunction.hpp
stan::is_constant::value
Definition:
is_constant.hpp:28
[
Stan Home Page
]
© 2011–2018, Stan Development Team.