Boost logo

Boost :

From: David Abrahams (david.abrahams_at_[hidden])
Date: 2001-07-10 16:41:11


----- Original Message -----
From: "Jeremy Siek" <jsiek_at_[hidden]>
>
> So what are the "usual" semantics :) I think we mean deep copy semantics,
> but that should be made explicit. It might be worth formalizing this to
> some extent, i.e., that a copy of an object must be equivalent to the
> original object in some sense. For example, if the objects have an
> operator== then equivalent means
>
> T b(a);
> assert(a == b);
> assert(b != c);
> a = c;
> assert(a != b);
> assert(a == c);

That's a can of worms which even the standards committee chose to leave
unopened. There's no way that the copy can be equivalent in all ways since
the objects will have distinct addresses (unless, I guess, someone overloads
operator&). Anyway, I'm afraid of what will happen if we try to specify
equivalence.

-Dave


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