1#ifndef STAN_MATH_PRIM_META_REF_TYPE_HPP
2#define STAN_MATH_PRIM_META_REF_TYPE_HPP
25template <
bool Condition,
typename T,
typename =
void>
27 using type = std::conditional_t<std::is_rvalue_reference<T>::value,
28 std::remove_reference_t<T>,
const T&>;
31template <
bool Condition,
typename T>
37 = std::conditional_t<std::is_rvalue_reference<T>::value,
38 std::remove_reference_t<T>,
const T&>;
39 using T_dec = std::decay_t<decltype(std::declval<T>().derived())>;
41 using type = std::conditional_t<
42 Eigen::internal::traits<Eigen::Ref<std::decay_t<T_plain>>>::
43 template match<T_dec>::MatchAtCompileTime
48template <
bool Condition,
typename T>
57template <
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_constant< T >::value, T >::type ref_type_if_not_constant_t
typename plain_type< T >::type plain_type_t
typename ref_type_if< Condition, T >::type ref_type_if_t
typename ref_type_if< true, T >::type ref_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,...