# std, Qstd

Tells the compiler to conform to a specific language standard.

## Syntax

Linux: | -std=val

macOS: | -std=val

Windows: | /Qstd:val /std:val (For Microsoft* compatibility)

## Arguments

val | Specifies the specific language standard to conform to. The following values apply to Linux* -std and Windows* /Qstd:
c++2b | Enables support for the Working Draft for ISO C++ 2023 DIS standard.
c++20 | Enables support for the 2020 ISO C++ DIS standard.
c++17 | Enables support for the 2017 ISO C++ standard with amendments.
c++14 | Enables support for the 2014 ISO C++ standard with amendments.
c++11 | Enables support for the 2011 ISO C++ standard with amendments.
c++98 and c++03 | Enables support for the 1998 ISO C++ standard with amendments.
c2x | Enables support for the Working Draft for ISO C2x standard.
c18 and c17 | Enables support for the 2017 ISO C standard. Support for c17 can also be enabled by value iso9899:2017. Support for c18 can also be enabled by value iso9899:2018.
c11 | Enables support for the 2011 ISO C standard. Support for this standard can also be enabled by value iso9899:2011.
c99 | Enables support for the 1999 ISO C standard. Support for this standard can also be enabled by value iso9899:1999.
c90 and c89 | Enables support for the 1990 ISO C standard. Support for this standard can also be enabled by value iso9899:1990.
The following values apply only to Linux -std:
gnu++2b | Enables support for the Working Draft for ISO C++ 2023 DIS standard plus GNU extensions.
gnu++20 | Enables support for the 2020 ISO C++ DIS standard plus GNU extensions.
gnu++17 | Enables support for the 2017 ISO C++ standard with amendments plus GNU extensions.
gnu++14 | Enables support for the 2014 ISO C++ standard with amendments plus GNU extensions.
gnu++11 | Enables support for the 2011 ISO C++ standard with amendments plus GNU extensions.
gnu++98 and gnu++03 | Enables support for the 1998 ISO C++ standard with amendments plus GNU extensions.
gnu2x | Enables support for the Working Draft for ISO C2x standard plus GNU extensions.
gnu18 and gnu17 | Enables support for the 2017 ISO C standard plus GNU extensions.
gnu11 | Enables support for the 2011 ISO C standard plus GNU extensions.
gnu99 | Enables support for the 1999 ISO C standard plus GNU extensions.
gnu90 and gnu89 | Enables support for the 1990 ISO C standard plus GNU extensions.
For possible values for Microsoft*-compatible Windows* /std, see the Microsoft* documentation.

## Default

Default for Windows option /Qstd: OFF | The compiler does not conform to a specific language standard.
Default for Windows option /std: c++14 | Currently, the compiler conforms to the 2014 ISO C++ standard. For the latest information, see the Microsoft* documentation.
Default for Linux option -std on icc (Classic C compiler): c99 or c11 | If using GCC5.x or higher, the compiler conforms to c99, which is the 1999 ISO C standard. If using GCC5.0 or lower, the compiler conforms to c11, which is the 2011 ISO C standard.
Default for Linux option -std on icpc (Classic C++ compiler): varies | If using GCC5.x or lower, the compiler conforms to c++98, which is the 1998 ISO C++ standard. If using GCC6.0 to GCC11.0, the compiler conforms to c++14, which is the 2014 ISO C++ standard. If using GCC11.1 or higher, the compiler conforms to c++17, which is the 2017 ISO C++ standard.

## Description

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

## IDE Equivalent

Visual Studio: Language > C/C++ Language Support

Eclipse: Language > ANSI Conformance

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

## Alternate Options

None

Parent topic: Language Options