This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Agreed. Thanks for asking on the reflector.we reject, with a "different exception specifier" error, both:
template<typename T> struct A { ~A() noexcept; };
template<typename T> A<T>::~A() { }
and:
template<typename T> struct A { ~A(); };
template<typename T> A<T>::~A() noexcept { }
Over the last days I wasted a lot of time trying painfully to not reject either, but actually now I'm pretty sure that we are right to reject the former (there are exception specifiers on the declaration thus automatic deduction should not trigger at all) and probably also the latter.
I'm OK with that, as long as we correctly allow
struct B { ~B() noexcept; };
B::~B() { }
and
struct B { ~B(); }; B::~B() noexcept { }
Thanks again, the patch is in with the attached ChangeLog.
The patch is OK.
Attachment:
CL_50043
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |