Opened 16 years ago

Closed 16 years ago

#291 closed discussion (fixed)

vector::resize does not behave like std::vector

Reported by: Peter Owned by: Peter
Priority: minor Milestone: yat 0.4
Component: utility Version: trunk
Keywords: Cc:


In the following code

vector vec(10,3.14);
cout << vec(0);

will display 0 while in std::vector case similar code will display 3.14 that is when size is decreased values are not changed. This could be confusing for user?

Change History (3)

comment:1 Changed 16 years ago by Peter

After ticket:256 is implemented, we can write

vector vec;
vec = vector(5,3.14);

so resize is not really needed. I vote for removing the function.

comment:2 Changed 16 years ago by Peter

Owner: changed from Jari Häkkinen to Peter
Status: newassigned

We have decided to remove resize function

comment:3 Changed 16 years ago by Peter

Resolution: fixed
Status: assignedclosed

in [1036]

Note: See TracTickets for help on using tickets.