Boost logo

Boost Users :

From: Frank Birbacher (bloodymir.crap_at_[hidden])
Date: 2008-05-04 07:04:38


Hi!

Jose Martinez schrieb:
> The copy constructor would then look like this.
>
> print (const print& p): t(p.t), count(p.count){++d_count;}

Remember: the operator = goes along with the copy constructor. Usually
you don't modify the "state" from inside the copy ctor. But here it is
only some debug statement. But remember: if you do change the state you
should think about the operator = , too.

> This matches with what Frank was saying about managing the state of operator()() outside of the object.

Yes. :)

Frank


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