Boost logo

Boost :

From: Michael Stevens (Michael.Stevens_at_[hidden])
Date: 2004-07-06 06:27:35


On Tuesday 06 July 2004 01:30, "Aleksey Gurtovoy" <agurtovoy_at_[hidden]>
wrote:

> Neither 'size1' nor 'num_rows' are generic, though. What you want is
> something like
>
>     template< int n > size(int_<n>);
>
> The particular int_<n> specializations then can be typedef'ed to
> something more mnemonic, e.g.
>
>     typedef int_<0> rows;
>
> or even
>
>     extern int_<0> rows;
>
> The lack of this genericity will force you, sooner or later, to resort
> to code duplication. I believe Vesa made the same point a long time
> ago... yep: http://thread.gmane.org/gmane.comp.lib.boost.devel/60338.

Aleksey,

Thanks for point this out. I had forgotten about Vesa contribution. It seems
this is very much a repeat of the discussion you link to.

Interestingly uBLAS never did get the generic versions of the functions.
Although it gained a set of similar functions for major/minor mappings.

Michael

-- 
___________________________________
Michael Stevens Systems Engineering
Navigation Systems, Estimation  and
                 Bayesian Filtering
    http://bayesclasses.sf.net
___________________________________

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk