Boost logo

Ublas :

From: Michael Stevens (mail_at_[hidden])
Date: 2005-08-29 06:36:13


On Friday 26 August 2005 13:48, Dima Sorkin wrote:
> Hi.
> Following the message of Vardan in this subject.
> Noncopyability of carray_adaptor.
>
> see this example of one of the previous messages in the list :
> double d[3];
> shallow_array_adaptor<double> shared(3, d);
> vector<double, shallow_array_adaptor<double> > shared_vec(3, shared);
>
> This will not work with carray_adaptor, because copy constructor of it
> is used when constructing the "shared_vec" .

This makes the proposed 'carray_adaptor' less then useful!
This only way to use it would be to have:

vector<double, carray_adaptor<double> > array_vec();
double d[3];
array_vec.data ().resize (3, d);

This does not seem so elegant!

Have to think about this,

  Michael

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