http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58859

--- Comment #3 from meng at g dot clemson.edu ---
(In reply to Marc Glisse from comment #2)
> Try adding noexcept(false) on the destructor?

that works. Thanks.
but this causes another question.

c++11 15.4/12 states
"A function with no exception-specification or with an exception-specification
of the form noexcept(constant-expression) where the constant-expression yields
false allows all exceptions."

my understanding is that having no exception-specification is equivalent to say
noexcept(false), i.e., functions are considered to throw exceptions by default
unless specified otherwise. I think this is also supported by 5.3.7/3 bullet 1.

interestingly, though, the following failed on 4.8.[01] and succeeded on
earlier versions of g++ that I have.

 static_assert(noexcept(std::declval<test_t>().~test_t())==false,"");

did I misunderstand something?

Reply via email to