1 #ifndef STAN__MATH__ERROR_HANDLING__MATRIX__CHECK_SIZE_MATCH_HPP
2 #define STAN__MATH__ERROR_HANDLING__MATRIX__CHECK_SIZE_MATCH_HPP
5 #include <boost/type_traits/common_type.hpp>
12 template <
typename T_size1,
typename T_size2,
typename T_result>
19 typedef typename boost::common_type<T_size1,T_size2>::type
common_type;
20 if (static_cast<common_type>(i) == static_cast<common_type>(j))
23 std::ostringstream msg;
24 msg << name_i <<
" (%1%) and "
25 << name_j <<
" (" << j <<
") must match in size";
26 std::string tmp(msg.str());
27 return dom_err(
function,i,name_i,
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_size_match(const char *function, T_size1 i, const char *name_i, T_size2 j, const char *name_j, T_result *result)