Automatic Differentiation
 
Loading...
Searching...
No Matches
is_var.hpp
Go to the documentation of this file.
1#ifndef STAN_MATH_REV_META_IS_VAR_HPP
2#define STAN_MATH_REV_META_IS_VAR_HPP
3
6#include <type_traits>
7
8namespace stan {
9
10namespace internal {
11template <typename T>
12struct is_var_impl : std::false_type {};
13
14template <typename T>
15struct is_var_impl<math::var_value<T>> : std::true_type {};
16} // namespace internal
20template <typename T>
21struct is_var<T,
22 std::enable_if_t<internal::is_var_impl<std::decay_t<T>>::value>>
23 : std::true_type {};
24
25} // namespace stan
26#endif
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...
STL namespace.
Defines a static member named value which is defined to be false as the primitive scalar types cannot...
Definition is_var.hpp:14