I often hear that the C ++ exception system can be turned off, since you do not have to pay for what you do not use. If I want to compile my program in C ++ without exception, will this lead to undefined behavior?
In the current (and future) C ++ standard, there is no concept of throwing exceptions. So technically yes, this leads to undefined behavior if you ask for language advocates. Realistic implementations try to define reasonable behavior for this popular extension. Consult your documentation.
To add to the answer of Howard.
, , , , .
new, , throw std::bad_alloc, . , 0: , new , 0? ?
new
throw
std::bad_alloc
0
CLang , , throw try , , , , .
try
Source: https://habr.com/ru/post/1793474/More articles:Image masking - cssAssign python list fragment from lambda - pythonTabhost scroll down - androidСортировка не более 10 миллионов 7-значных чисел. Ограничения: 1M RAM, высокая скорость. несколько секунд хороши - algorithmSaving Javascript and Sync'd Server Code - javascriptOOP: passing an object or passing attributes to a method - variablesпроцессы delayed_job убиваются молча - ruby-on-railsЧто такое хороший интерфейс для отображения на нескольких языках - user-interfaceNSMutable array - assigning and saving objects - memory-managementbackground scroll - flashAll Articles