|
Boost : |
From: Thorsten Ottosen (nesotto_at_[hidden])
Date: 2004-09-27 08:09:20
From: "Howard Hinnant" <hinnant_at_[hidden]>
| On Sep 27, 2004, at 2:46 AM, Thorsten Ottosen wrote:
|
| > "Howard Hinnant" <hinnant_at_[hidden]> wrote in message
| > | But elements can be moved into or out of the container:
| > |
| > | sole_ptr<T> t = move(v[i]);
| > | v.push_back(move(t));
| >
| > so move(v[i]) must also erase the element and then move
| > the rest of the vector one place back?
|
| Nope. move(v[i]) would move from the sole_ptr<T> at i, but not erase
| it. v[i] would now own nothing. This is another difference between
| this future language I'm describing, and the Smart Container Library.
| The former allows null pointers where the latter doesn't.
hm...I don't get this...what happens then if I try to access v[i]? Do I get
undefined behavior?
br
Thorsten
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk