Feature macros

Macros in this section control optional features in the library.

TBB_DEPRECATED macro

The macro TBB_DEPRECATED controls deprecated features that would otherwise conflict with non-deprecated use. Define it to be 1 to get deprecated Intel® Threading Building Blocks (Intel® TBB) 2.1 interfaces.

TBB_USE_EXCEPTIONS macro

The macro TBB_USE_EXCEPTIONS controls whether the library headers use exception-handling constructs such as try, catch, and throw. The headers do not use these constructs when TBB_USE_EXCEPTIONS=0.

For the Microsoft Windows*, Linux*, and MacOS* operating systems, the default value is 1 if exception handling constructs are enabled in the compiler, and 0 otherwise.

Caution

The runtime library may still throw an exception when TBB_USE_EXCEPTIONS=0.

TBB_USE_CAPTURED_EXCEPTION macro

The macro TBB_USE_CAPTURED_EXCEPTION controls rethrow of exceptions within the library. Because C++ 1998 does not support catching an exception on one thread and rethrowing it on another thread, the library sometimes resorts to rethrowing an approximation called tbb::captured_exception.

The default value is 1 for supported host compilers with std::exception_ptr, and 0 otherwise.

See Also