This is a follow on to D21232, which marked a bunch of exception-throwing helper routines as noreturn.
Now, make them really never return. Either they throw, or they call abort.
Paths
| Differential D23855
Make exception-throwing from a noexcept build `abort()`. ClosedPublic Authored by mclow.lists on Aug 24 2016, 3:36 PM.
Details
Diff Detail Event Timelinemclow.lists retitled this revision from to Make exception-throwing from a noexcept build `abort()`.. mclow.lists updated this object. Comment Actions I like the patch.
mclow.lists edited edge metadata. Comment ActionsI like this revision better; I need to check, but I think this hits all the exception classes. Goal: Every exception class in the standard should have a VSTD::__throw_XXX function, marked _LIBCPP_NORETURN inline _LIBCPP_ALWAYS_INLINE, that does the throwing. Note #1: __throw_bad_alloc is already in namespace std.
sebpop edited edge metadata. Comment ActionsVery nice cleanup. This revision is now accepted and ready to land.Aug 25 2016, 4:57 AM
Revision Contents
Diff 69201 include/__functional_03
include/__locale
include/any
include/array
include/bitset
include/complex
include/deque
include/experimental/any
include/experimental/dynarray
include/experimental/optional
include/experimental/string_view
include/fstream
include/functional
include/future
include/locale
include/memory
include/new
include/regex
include/stdexcept
include/string
include/typeinfo
include/vector
src/debug.cpp
src/experimental/memory_resource.cpp
src/locale.cpp
src/new.cpp
src/string.cpp
src/system_error.cpp
src/thread.cpp
src/typeinfo.cpp
|
Maybe you can use __throw_out_of_range?
Fewer #ifdefs in the code is better.