3. Using the C++ Compiler Options
6. Creating and Using Templates
8.1 Synchronous and Asynchronous Exceptions
8.4 Using Runtime Functions and Predefined Exceptions
8.6 Building Shared Libraries That Have Exceptions
9. Improving Program Performance
10. Building Multithreaded Programs
12. Using The C++ Standard Library
13. Using the Classic iostream Library
You can use the setjmp/longjmp functions in a program where exceptions can occur, as long as they do not interact.
All the rules for using exceptions and setjmp/longjmp separately apply. In addition, a longjmp from point A to point B is valid only if an exception thrown at A and caught at B would have the same effect. In particular, you must not longjmp into or out of a try-block or catch-block (directly or indirectly), or longjmp past the initialization or non-trivial destruction of auto variables or temporary variables.
You cannot throw an exception from a signal handler.