Automatic Differentiation
 
Loading...
Searching...
No Matches
is_constant.hpp
Go to the documentation of this file.
1#ifndef STAN_MATH_PRIM_META_IS_CONSTANT_HPP
2#define STAN_MATH_PRIM_META_IS_CONSTANT_HPP
3
12#include <type_traits>
13#include <vector>
14namespace stan {
15
29template <typename T, typename = void>
30struct is_constant : bool_constant<std::is_convertible<T, double>::value> {};
31
38template <typename... T>
40
48template <typename T>
50 : bool_constant<is_constant<typename std::decay_t<T>::value_type>::value> {
51};
52
61template <typename T>
63 : bool_constant<is_constant<typename std::decay_t<T>::Scalar>::value> {};
64
65} // namespace stan
66#endif
require_t< is_eigen< std::decay_t< T > > > require_eigen_t
Require type satisfies is_eigen.
Definition is_eigen.hpp:55
require_t< is_std_vector< std::decay_t< T > > > require_std_vector_t
Require type satisfies is_std_vector.
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...
Metaprogramming struct to detect whether a given type is constant in the mathematical sense (not the ...
Extends std::true_type when instantiated with zero or more template parameters, all of which extend t...