list::_M_check_equal_allocators throws

François Dumont frs.dumont@gmail.com
Wed Sep 18 19:26:00 GMT 2013


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



More information about the Libstdc++ mailing list