Boost logo

Boost :

From: Douglas Gregor (gregod_at_[hidden])
Date: 2003-05-05 14:23:17


On Monday 05 May 2003 03:07 pm, daniel wrote:
> int main(void)
> {
> boost::numeric::ublas::vector<int> r(2);
> map<int,IntVector> m;
>
> m[0] = r;
>
> return 0;
> }

The expression m[0] uses the default constructor of ublas::vector<int> to
build an object to be returned by reference (so that the '= r' assigns to a
propertly constructed object). However, the default constructor builds a
vector with zero arguments and you are trying to assign to that vector
another vector with 2 arguments.

        Doug


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