1#ifndef STAN_MATH_PRIM_META_REF_TYPE_HPP
2#define STAN_MATH_PRIM_META_REF_TYPE_HPP
26template <
bool Condition,
typename T,
typename =
void>
28 using type = std::conditional_t<std::is_rvalue_reference<T>::value,
29 std::remove_reference_t<T>,
const T&>;
32template <
bool Condition,
typename T>
38 = std::conditional_t<std::is_rvalue_reference<T>::value,
39 std::remove_reference_t<T>,
const T&>;
40 using T_dec = std::decay_t<decltype(std::declval<T>().derived())>;
42 using type = std::conditional_t<
43 Eigen::internal::traits<Eigen::Ref<std::decay_t<T_plain>>>::
44 template match<T_dec>::MatchAtCompileTime
49template <
bool Condition,
typename T>
58template <
bool Condition,
typename T>
require_t< is_arena_matrix< std::decay_t< T > > > require_arena_matrix_t
Require type satisfies is_arena_matrix.
std::integral_constant< bool, B > bool_constant
Alias for structs used for wraps a static constant of bool.
typename ref_type_if< is_autodiff_v< T >, T >::type ref_type_if_not_constant_t
typename ref_type_if< Condition, T >::type ref_type_if_t
typename ref_type_if< true, T >::type ref_type_t
typename plain_type< std::decay_t< T > >::type plain_type_t
std::enable_if_t< math::conjunction< Checks... >::value > require_all_t
If all conditions are true, template is enabled Returns a type void if all conditions are true and ot...
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...
Defines a static member named value which is defined to be true if the type is arena_matrix<T>
Check if type derives from EigenBase
std::conditional_t< Eigen::internal::traits< Eigen::Ref< std::decay_t< T_plain > > >::template match< T_dec >::MatchAtCompileTime||!Condition, T_optionally_ref, T_plain > type
std::conditional_t< std::is_rvalue_reference< T >::value, std::remove_reference_t< T >, const T & > T_optionally_ref
std::decay_t< decltype(std::declval< T >().derived())> T_dec
plain_type_t< T > T_plain
typename ref_type_if< Condition, typename std::decay_t< T >::Base >::type type
std::conditional_t< std::is_rvalue_reference< T >::value, std::remove_reference_t< T >, const T & > type
If the condition is true determines appropriate type for assigning expression of given type to,...