This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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]

Re: list::_M_check_equal_allocators throws


On 09/17/2013 05:52 PM, Jonathan Wakely wrote:
I support adding noexcept specifications to places that shouldn't throw, even if that prevents us using exceptions to identify undefined behaviour, like this case. Others might disagree though, and prefer having an exception thrown, so I'm interested to hear what other people think.
In one of my TODOs for debug mode was the possibility for users to request exceptions instead of an abortion on debug checks. In plugin oriented application we have nowadays it is quite painful to have one of the plugin to collapse the whole application because of some internal issue while it could be simply unloaded. I know that we can't always provide strong exception safety guaranty but I still think it worth the effort.

But that would be for debug that might not have the same noecept specification as the normal mode.

Maybe this choice between abortion or exception could be a user decision through a configuration option. And not necessarily limited to the debug mode.

François


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]