12 Feb
2016
12 Feb
'16
1:01 a.m.
On 12/02/2016 13:50, Peter Dimov wrote:
Then why doesn't it throw a logic_error?
Because throwing a logic_error is an oxymoron. Logic errors should not throw.
And yet it was defined in the standard library for that purpose. :)
Or call abort()?
That's basically what it does. Or a crash when asserts are disabled.
Again, an assert is a useful tool in debug mode but it disappears in release mode. The only reason to elide this check is for performance.
That's correct.
Then it appears we are in violent agreement after all. :)