
Sorry for the spam, I didn't realize that C++ has a template problem.
One possible resolution is to place the source inside the header file,
which is what I did. There another resolution, which uses the "export"
keyword and you can also place the template declaration at the end of
the source file.
Max
On Mon, Aug 2, 2010 at 2:05 PM, Max S. Kaznady
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
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