Automatic Differentiation
 
Loading...
Searching...
No Matches
is_vari.hpp
Go to the documentation of this file.
1#ifndef STAN_MATH_REV_META_IS_VARI_HPP
2#define STAN_MATH_REV_META_IS_VARI_HPP
3
6#include <type_traits>
7
8namespace stan {
9
10namespace internal {
11template <typename T>
12struct is_vari_impl : std::false_type {};
13
14template <typename T>
15struct is_vari_impl<math::vari_value<T>> : std::true_type {};
16
17template <typename T>
18struct is_vari_impl<math::vari_view<T>> : std::true_type {};
19
20} // namespace internal
25template <typename T>
26struct is_vari<T, require_t<internal::is_vari_impl<std::decay_t<T>>>>
27 : std::true_type {};
28
29} // namespace stan
30#endif
std::enable_if_t< Check::value > require_t
If condition is true, template is enabled.
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...
Specialization for checking if value of T minus cv qualifier and pointer is a vari.
Definition is_vari.hpp:13