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>
13 template <
typename T_size1,
typename T_size2,
typename T_result,
23 typedef typename boost::common_type<T_size1,T_size2>::type
common_type;
24 if (static_cast<common_type>(i) != static_cast<common_type>(j)) {
25 std::ostringstream msg;
26 msg << name_i <<
" (%1%) and " << name_j <<
" (" << j <<
") must match in size";
27 T_result tmp = policies::raise_domain_error<T_result,T_size1>(
function,
37 template <
typename T_size1,
typename T_size2,
typename T_result>
48 template <
typename T_size1,
typename T_size2>
55 T_size1* result = 0) {