1 #ifndef STAN_MATH_PRIM_MAT_ERR_CHECK_STD_VECTOR_INDEX_HPP
2 #define STAN_MATH_PRIM_MAT_ERR_CHECK_STD_VECTOR_INDEX_HPP
32 const std::vector<T>& y,
38 std::stringstream msg;
39 msg <<
" for " << name;
40 std::string msg_str(msg.str());
bool check_std_vector_index(const char *function, const char *name, const std::vector< T > &y, int i)
Return true if the specified index is valid in std vector.
void out_of_range(const char *function, const int max, const int index, const char *msg1="", const char *msg2="")
Throw an out_of_range exception with a consistently formatted message.