Ask Learn
Preview
Please sign in to use this experience.
Sign inThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The C++ standard recommends limits for various language constructs. The following is a list of cases where the Microsoft C++ compiler does not implement the recommended limits. The first number is the limit that is established in the ISO C++11 standard (INCITS/ISO/IEC 14882-2011[2012], Annex B) and the second number is the limit implemented by the Microsoft C++ compiler:
Nesting levels of compound statements, iteration control structures, and selection control structures - C++ standard: 256, Microsoft C++ compiler: depends on the combination of statements that are nested, but generally between 100 and 110.
Parameters in one macro definition - C++ standard: 256, Microsoft C++ compiler using /Zc:preprocessor-
:127 or using /Zc:preprocessor
:32767.
Arguments in one macro invocation - C++ standard: 256, Microsoft C++ compiler using /Zc:preprocessor-
:127 or using /Zc:preprocessor
:32767.
Characters in a character string literal or wide string literal (after concatenation) - C++ standard: 65536, Microsoft C++ compiler: 65535 single-byte characters, including the NULL terminator, and 32767 double-byte characters, including the NULL terminator.
Levels of nested class, structure, or union definitions in a single struct-declaration-list
- C++ standard: 256, Microsoft C++ compiler: 16.
Member initializers in a constructor definition - C++ standard: 6144, Microsoft C++ compiler: at least 6144.
Scope qualifications of one identifier - C++ standard: 256, Microsoft C++ compiler: 127.
Nested extern
specifications - C++ standard: 1024, Microsoft C++ compiler: 9 (not counting the implicit extern
specification in global scope, or 10, if you count the implicit extern
specification in global scope.
Template arguments in a template declaration - C++ standard: 1024, Microsoft C++ compiler: 2046.
Please sign in to use this experience.
Sign in