pVector must contain a number of elements which is at least a product of the ColumnCount and the RowCount class template arguments. The behaviour is undefined otherwise. Hence, the constructor is not safe. Consider construction of the matrix from iterators. pVector must contain a number of elements which is at least a product of the ColumnCount and the RowCount class template arguments. The behaviour is undefined otherwise. Hence, the constructor is not safe. Consider construction of the matrix from iterators.