Visible to Intel only — GUID: GUID-4A7AB9AD-C7A6-4F67-8A8D-BD81661D77B3
Visible to Intel only — GUID: GUID-4A7AB9AD-C7A6-4F67-8A8D-BD81661D77B3
Enable C++11 Lambda Expression Support with Intel® oneAPI Threading Building Blocks (oneTBB)
The C++11 (new standard for the C++ language, formerly C++0x) lambda expression support makes many Intel® oneAPI Threading Building Blocks (oneTBB) constructs easier to program because it avoids the need to introduce extra classes to encapsulate code as functions. If you decide to use this feature, you need a compiler that supports it, such as the Intel® C++ Compiler Classic or Intel® oneAPI DPC++/C++ Compiler. For more information about C++11 lambda expression support in the other compilers, please see your compiler documentation (online help).
When using the command line with the Intel® C++ Compiler Classic or Intel® oneAPI DPC++/C++ Compiler, specify the following option to enable lambda expression support:
- For Windows* OS: /Qstd=c++0x
- For Linux* OS: -std=c++0x
To enable the C++11 support in Visual Studio on a Windows* OS system:
- In Solution Explorer, select (click) the name of one or more projects. To select multiple projects, hold down the Ctrl key.
- Right-click the project name and select Intel Compiler > Use Intel C++ from the context menu.
- Select Project > Properties, or right-click the project name and select Properties from the context menu.
- Specify the following Configuration Properties:
C++ > Language
Under Intel Specific, select Enable C++0x Support as Yes
- Click OK to save the specified properties.
- Repeat the steps above for other configurations.