Intel® C++ Compiler 16.0 User and Reference Guide

std, Qstd

Tells the compiler to conform to a specific language standard.

Syntax

Linux and OS X:

-std=val

Windows:

/Qstd=val

Arguments

val

Specifies the specific language standard to conform to. Possible values are:

c++14

Enables support for the 2014 ISO C++ standard features. The following features are available:

  • Tweaked working for contextual conversion

  • Binary literals

  • decltype(auto), return type deduction for normal functions

  • Initialized lambda captures: simple-capture, init-captur

  • Generic lambda expressions

  • NSDMIs for aggregates

  • [deprecated] attributes

  • Single-Quotation-Mark as a digit separator

c89

Conforms to the ISO/IEC 9899:1990 International Standard. This value is only available on Linux* OS and OS X*.

c99

Conforms to The ISO/IEC 9899:1999 International Standard.

gnu89

Conforms to ISO C90 plus GNU* extensions. This value is only available on Linux* OS and OS X*.

gnu99

Conforms to ISO C99 plus GNU* extensions. This value is only available on Linux* OS and OS X*.

gnu++98

Conforms to the 1998 ISO C++ standard plus GNU extensions. This value is only available on Linux* OS and OS X*.

c++11

Enables support for many C++11 (formerly known as C++0x) features. The following are the most recently added features:

  • Defining move special member functions (N3053)

  • Explicit virtual overrides (N2928,N3206,N3272)

  • Full implementation of constexpr (this feature is only available on Linux* OS and OS X*)

  • Full implementation of initializer lists

  • Full implementation of noexcept

  • Full implementation of non static data members (i.e. field initializers)

  • Raw string literals and UTF-8 literals

  • Delegating constructors

  • Ref-qualifiers on member functions

  • Additional type trait helpers (for example, __is_nothrow_assignable, __is_trivially_assignable, __is_trivially_constructible, __bases, __direct_bases, etc.)

For a list of C++11 features that were previously implemented by the Intel® C++ Compiler, see the article titled C++11 Features Supported by Intel® C++ Compiler, which is located in http://software.intel.com/en-us/articles/c0x-features-supported-by-intel-c-compiler/

c++0x

This value is equivalent to specifying value c++11.

gnu++0x

This value is equivalent to specifying value c++0x. This value is only available on Linux* OS and OS X*.

Default

-std=gnu89 (default for C)

Conforms to ISO C90 plus GNU extensions.

-std=gnu++98 (default for C++)

Conforms to the 1998 ISO C++ standard plus GNU* extensions.

/Qstd

OFF. Note that a subset of C++11 features is enabled by default for compatibility with a particular version of Microsoft Visual Studio* C++, so you only need to specify /Qstd=c++0x if you want additional C++11 functionality beyond what Microsoft provides.

Description

This option tells the compiler to conform to a specific language standard.

On Windows* OS, you can only specify values c99 and c++0x.

IDE Equivalent

Visual Studio: Language > Enable C++0x Support

Language > Enable C99 Support

Eclipse: Language > ANSI Conformance

Xcode: Language > C Language Dialect and C++ Language Dialect

Alternate Options

None