How does std :: uncaught_exception work?

Introduction

There are reports and articles about use and rationality std::uncaught_exception.

The functionality provided by this function boils down to

std :: uncaught_exception detects that the stack is currently unwinding.

Q

When looking for its definition, all I see is a DLL call

_CRTIMP2_PURE bool __CLRCALL_PURE_OR_CDECL uncaught_exception();

How can this level of introspection be achieved in a program? Is this something feasible with simple C ++ or compiler / assembly magic that should come into play?

0
source share
2 answers

, uncaught_exception " " ( 18, [language.support]). , , ( , ).

, . ( -, "" ++, - - . 18, , .)

ABI; - , . , , , , .

+3

, . , . , , .

++ ABI, Itanium, ABI. ABI , ++, ++, Itanium ABI, , , (), RTTI ..

exception handling , __cxa_eh_globals , , uncaught_exception(), - , uncaughtExceptions .

, , ABI, ABI - , , , .

+5

All Articles