Boost LA

operator+(matrix,matrix)

#include <boost/la/matrix_plus_matrix.hpp>

#include <boost/la/deduce_matrix.hpp>

namespace
boost
    {
    namespace
    la
        {
        //Only enabled if:
        //  is_matrix<A>::value && is_matrix<B>::value &&
        //  matrix_traits<A>::rows==matrix_traits<B>::rows &&
        //  matrix_traits<A>::cols==matrix_traits<B>::cols
        template <class A,class B>
        typename deduce_matrix2<A,B,matrix_traits<A>::rows,matrix_traits<A>::cols>::type
        operator+( A const & a, B const & b );
        }
    }

Returns:

A matrix of the same size as a and b, with elements the elements of b added to the corresponding elements of a.

Required access:

result:iw, a:ir, b:ir.