4 ms·
C++ had runtime checked exceptions, which aside for the except/noexcept case, were pretty useless (and never implemented by MSVC). I'm a huge fan of checked ex
by gpderetta 7y ago
C++ had runtime checked exceptions, which aside for the except/noexcept case, were pretty useless (and never implemented by MSVC).
I'm a huge fan of checked exception, given a type system powerful enough to parametrize over them (C++ should be more than capable), so I'm looking forward to the development. Stroustrup is not a fan though and he might kill the effort.
- pjmlp 7y agoI imagine that if value type exceptions get added, they will be exposed in the type system just like noexcept is.
- gpderetta 7y agooh, yes. As far as I can tell, these static exceptions are basically syntactic sugar over an either<T, Except> return type, possibly with a custom ABI that stores the discriminant implicitly in a flag register (so on the call side you do not even need to load the discriminant and compare it and instead directly do a JMPcc ).