Boost logo

Boost Users :

From: speedsnaii (speedsnaii_at_[hidden])
Date: 2003-03-11 06:37:11


Hi Joerg,

>
> > I think my derived class is not 'copy constructible'
> > and 'assignable'.
> > Is there a simple way to fix this?
>
> I believe yes: we could drop the requirement that assignments have
to be
> size conformant. But this requirement is pretty useful when doing
basic
> linear algebra IMHO. So I'd like to hear other opinions...
>

Thank you, this will work for me. But still a question left:

It seems even when I use the copy constructor of a ublas::vector the
values are copied using the assignment operator. Shouldn't they be
copied using their copy constructor instead? In this case also
ublas::vector would work as same as std::vector.

It is meaningful, when the operator= would not work since the
contained vectors of course are not the same size. This problem will
arise whenever doing 'vector of vector' or similar.

> > (I am not even sure whether this is a uBLAS matter. So please
simple
> > tell me, and I will try to learn the missing parts.)
>
> It's definitely an ublas matter: should we increase standard
compatibility
> or stay with the size conformance restriction.
>

I think vector is copy constructible, if the element type also is
copy constructible, isn't it? And if I use a vector as a element type
(which is copy constructible I think), there should be no problem. No
need to give up current size conformance restriction behaviour for
assignment.

What do you think?

Regards,
Roland


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net