1 #ifndef STAN__MATH__ERROR_HANDLING__MATRIX__CHECK_STD_VECTOR_INDEX_HPP
2 #define STAN__MATH__ERROR_HANDLING__MATRIX__CHECK_STD_VECTOR_INDEX_HPP
24 template <
typename T_y,
typename T_result>
27 const std::vector<T_y>& y,
30 if ((i > 0) && (i <= static_cast<size_t>(y.size())))
33 std::ostringstream msg;
34 msg << name <<
" (%1%) must be greater than 0 and less than "
36 std::string tmp(msg.str());
bool dom_err(const char *function, const T &y, const char *name, const char *error_msg, const T_msg error_msg2, T_result *result)
bool check_std_vector_index(const char *function, size_t i, const std::vector< T_y > &y, const char *name, T_result *result)
Return true if the specified index is valid in std vector.