9 ms·
No, nothing in C++ has a hard dependency on exceptions. Custom allocators can be used to report allocation failures in some way other than throwing an exception
by plorkyeran 7y ago
No, nothing in C++ has a hard dependency on exceptions. Custom allocators can be used to report allocation failures in some way other than throwing an exception, and other than that the standard library only uses exceptions to report precondition violations; things which are expected to sometimes fail (such as filesystem operations) can report error codes instead.