Interesting new C++Next article about destructors that throw:
Evil, or Just Misunderstood?
by Jon Kalb and Dave Abrahams
From the script-style intro:
UDT (putting down drink and looking deep into CODER’s eyes): By the way, in my destructor I throw if the file fails to close properly.
CODER: I can live with that. [...] I’ve always been a sucker for dangerous types.
FADE TO BLACK
NARRATOR (V.O.): We invite you to journey with us now, into the heart of darkness, where we seek out throwing destructors and stare Evil™ in the face. Will CODER survive his encounter with exceptional destruction? The answers lie beyond the frontiers of usual best practice…
Add a Comment
Comments are closed.