|
Boost : |
From: Toon Knapen (toon.knapen_at_[hidden])
Date: 2002-04-04 04:03:47
On Thursday 04 April 2002 10:12, you wrote:
> Hi Toon,
>
> you wrote:
> > again a traits/partial spec. problem AFAICT.
> > Following code does not work with the current snapshot of ublas :
> >
> > const matrix< double > a( 8, 8 );
> > numerics::matrix_row< const matrix< double > > r = numerics::row(a, 2 );
>
> May be,
>
> const numerics::matrix_row< const matrix< double > > r = numerics::row(a,
> 2 );
>
> could work? I'll check this later.
>
> > double d = r(2) ;
> >
> > the ()-operator on the const matrix_row will return an M::reference which
> > should be in this case an M::const_reference !?
> >
> > (compiled with gcc303)
I missed that I had reported this already and locally patched it creating a
traits-class which, in case of a const M template argument, will make the
reference a const_reference. IIRC, the issue is that this solution is not
portable to MSVC ;-(
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk