Re: Smart Pointer Question.

Originally Posted by
marten_range
Also when using smart pointers the pointee class destructor must _not_ throw exceptions. This is very important!
This is in fact something that is good to keep as a rule of thumb all the time. You can get yourself into the same kind of mess even if you don't use smart pointers:
Code:
struct x
{
~x()
{
throw std::runtime_error("error");
}
};
void f()
{
x an_x;
throw std::runime_error("error"); // just as bad...
}
Insert entertaining phrase here