Boost logo

Ublas :

From: Michael Stevens (mail_at_[hidden])
Date: 2006-04-02 06:18:01


On Saturday, 25. March 2006 03:50, Manoj Rajagopalan wrote:
> Hi all
>
> THe triangular_matrix<> template has four class parameters, T, TRI, L,
> A:
>
> template<class T, class TRI, class L, class A>
> class triangular_matrix ...
>
> but when declaring an instance of such an array, we only need mention
> two, for eg:
>
> triangular_matrix<double, lower> m(3,3);
>
>
> The L and the A template parameters don't even have default values. How
> does the instantiation then work? Why is there no compile error saying
> there are no legitimate values for L and A?

All the default template arguments are defined in "fwd.hpp". So for triangylar
matrix we have:
    template<class T, class TRI = lower, class L = row_major, class A =
unbounded_array<T> >
    class triangular_matrix;

Michael

-- 
___________________________________
Michael Stevens Systems Engineering
34128 Kassel, Germany
Phone/Fax: +49 561 5218038
Navigation Systems, Estimation  and
                 Bayesian Filtering
    http://bayesclasses.sf.net
___________________________________