Re: Bjarne's exception safe sample
- From: "Alex Blekhman" <tkfx.REMOVE@xxxxxxxxx>
- Date: Mon, 24 Dec 2007 14:39:38 +0200
"George" wrote:
I agree with cd's comments. Maybe Bjarne means throwing exception through
operator new? Not sure his ideas -- hard to catch.
No, he means throwing an exception from T's copy constructor. You posted the quote yourself in original post:
-------
The assignment operator may fail by throwing an exception from T's copy constructor. This would leave a T in an undefined state because the old value of *p was destroyed and no new value replaced it.
-------
Alex
.
- Follow-Ups:
- Re: Bjarne's exception safe sample
- From: George
- Re: Bjarne's exception safe sample
- References:
- Bjarne's exception safe sample
- From: George
- Re: Bjarne's exception safe sample
- From: Carl Daniel [VC++ MVP]
- Re: Bjarne's exception safe sample
- From: Carl Daniel [VC++ MVP]
- Re: Bjarne's exception safe sample
- From: Alex Blekhman
- Re: Bjarne's exception safe sample
- From: Alex Blekhman
- Bjarne's exception safe sample
- Prev by Date: Re: Bjarne's exception safe sample
- Next by Date: Re: Bjarne's exception safe sample
- Previous by thread: Re: Bjarne's exception safe sample
- Next by thread: Re: Bjarne's exception safe sample
- Index(es):
Relevant Pages
|