Boost logo

Boost Users :

Subject: [Boost-users] matrix function template for triangular_matrix and matrix datatypes
From: Max S. Kaznady (max.kaznady_at_[hidden])
Date: 2010-08-02 14:05:34

Suppose we are working in namespace boost::numeric::ublas and I have 2 functions

1) template <class T> save_matrix(matrix<T> const &m)
2) template <class T> save_matrix(triangular_matrix<T,lower> const &m)

and the code in both overloaded save_matrix functions is identical.
How can I write a templated function which accepts any type of a
matrix? I tried this, but it didn't work:
template <class T> save_matrix(T const &m)


Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at