$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
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)
Thanks,
Max