1#ifndef STAN_MATH_PRIM_FUN_TO_REF_HPP
2#define STAN_MATH_PRIM_FUN_TO_REF_HPP
18 return std::forward<T>(a);
28template <
bool Cond,
typename T, std::enable_if_t<!Cond>* =
nullptr>
30 return std::forward<T>(a);
42template <
bool Cond,
typename T, std::enable_if_t<Cond>* =
nullptr>
44 return std::forward<T>(a);
T to_ref_if(T &&a)
No-op that should be optimized away.
ref_type_t< T && > to_ref(T &&a)
This evaluates expensive Eigen expressions.
typename ref_type_if< true, T >::type ref_type_t
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...