sun_fc: in C++11 this 'throw' will call 'terminate' because destructors default to 'noexcept'
Build errors with gcc 10:
../common/Listener.cc: In destructor 'Listener::~Listener()': ../common/Listener.cc:84:6: error: in C++11 this 'throw' will call 'terminate' because destructors default to 'noexcept' [-Werror=c++11-compat] 84 | throw; | ^~~~~ cc1plus: all warnings being treated as errors
We have type T as pointer to Listener, so no any exceptions at all.
From standard since C++11 n3690.pdf:
126.96.36.199 vector modifiers
iterator erase(const_iterator position);
iterator erase(const_iterator first, const_iterator last);
Throws: Nothing unless an exception is thrown by the copy constructor,
move constructor, assignment operator, or move assignment operator of T.
Testing done: build/install/boot but I have no FC stack to test with.
Updated by Electric Monk about 1 month ago
- Status changed from In Progress to Closed
- % Done changed from 90 to 100
commit f7c0877265657617150d9e7010f62fd4554ca9e5 Author: Toomas Soome <firstname.lastname@example.org> Date: 2020-06-03T17:38:31.000Z 12805 sun_fc: in C++11 this 'throw' will call 'terminate' because destructors default to 'noexcept' Reviewed by: Andrew Stormont <email@example.com> Reviewed by: Vitaliy Gusev <firstname.lastname@example.org> Reviewed by: Gordon Ross <email@example.com> Approved by: Dan McDonald <firstname.lastname@example.org>