Feature Macros

Macros in this section control optional features in the library.


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.


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 OS X* operating systems, the default value is 1 if exception handling constructs are enabled in the compiler, and 0 otherwise.


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


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.

  • Define TBB_USE_CAPTURED_EXCEPTION=1 to make the library rethrow an approximation. This is useful for uniform behavior across platforms.

  • Define TBB_USE_CAPTURED_EXCEPTION=0 to request rethrow of the exact exception. This setting is valid only on platforms that support the std::exception_ptr feature of C++11. Otherwise a compile-time diagnostic is issued.

On Windows* , Linux* and OS X* operating systems, the default value is 1 for supported host compilers with std::exception_ptr, and 0 otherwise. On IA-64 architecture processors the default value is 0.


In order for exact exception propagation to work properly an appropriate library binary should be used.

C++11 Support

To enable C++11 specific code, you need to use a compiler that supports C++11 mode, and compile your code with the C++11 mode set. C++11 support is off by default in the compiler. The following table shows the option for turning it on.

Compilation Commands for Setting C++11 Support


Intel® C++ Compiler (Version 11.0)

Compilation Command and Option

Windows* OS systems

icl /Qstd:c++0x foo.cpp

Linux* OS systems

OS X* systems

icc -std=c++0x foo.cpp

See Also

For more complete information about compiler optimizations, see our Optimization Notice.