#include <boost/qvm/deduce_mat.hpp>
namespace boost { namespace qvm { template < class M, int Rows=mat_traits<Matrix>::rows, int Cols=mat_traits<Matrix>::cols> struct deduce_mat { typedef /*unspecified*/ type; }; } }
is_mat<M>::value is true.
This template is used by Boost QVM whenever it needs to deduce a copyable matrix type of certain dimensions from a single user-supplied function parameter of matrix type. The returned type must have accessible copy constructor. Note that M itself may be non-copyable.
The main template definition returns an unspecified copyable matrix type of size Rows x Cols, except if mat_traits<M>::rows==Rows && mat_traits<M>::cols==Cols, in which case it returns M, which is suitable only if M is a copyable type. Boost QVM also defines (partial) specializations for the non-copyable matrix types it produces. Users can define other (partial) specializations for their own types.
A typical use of the deduce_mat template is for specifying the preferred matrix type to be returned by the generic function template overloads in Boost QVM depending on the type of their arguments.