User Guide

Contents

Enabling
C++11 Lambda Expression Support with
Intel® Threading Building Blocks (Intel® TBB)

The C++11 (new standard for the C++ language, formerly C++0x) lambda expression support makes many
Intel® Threading Building Blocks (Intel® TBB)
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
. 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
, 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:
  1. In Solution Explorer, select (click) the name of one or more projects. To select multiple projects, hold down the Ctrl key.
  2. Select
    Project
    >
    Properties
    , or right-click the project name and select
    Properties
    from the context menu.
  3. From the context menu, select
    Intel Parallel Studio XE [version]
    >
    Use Intel C++
  4. Specify the following Configuration Properties:
    C++
    >
    Language
     Under
    Intel Specific
    , select
    Enable C++0x Support
    as
    Yes
  5. Click
    OK
    to save the specified properties.
  6. Repeat the steps above for other configurations.
You have set up your environment to use the C++11 lambda expression support.

Product and Performance Information

1

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804