| title | What's new for the C++ docs |
|---|---|
| ms.date | 7/9/2021 |
| description | The new docs and doc updates for the Microsoft C/C++ compiler, ATL/MFC, C runtime, and standard library docs. |
This article lists major changes to the Microsoft C++ docs through June 2021.
- See what's new history for info about what was new in previous months.
- See What's new for C++ in Visual Studio for info about what's new in Visual Studio.
- See C++ conformance improvements in Visual Studio for the latest C and C++ conformance status.
New articles
- HeaderUnit class
- Module class
- PrecompiledHeader class
- TRANSLATION_UNIT_TYPE enum
- TRANSLATION_UNIT_TYPE_DATA enum
- TranslationUnitType class
Updated articles
- C++ Build Insights SDK: event table - add new C++ Build Insights events
- Get started with C++ Build Insights - add new C++ Build Insights events
Updated articles
_Static_assertkeyword andstatic_assertmacro (C11) - update the SDK to use- Alignment (C11) - update the SDK to use
- Generic selection (C11) - update the SDK to use
Updated articles
In addition to the changes below, many articles were updated to prevent the machine translation of code elements.
_cprintf_p, _cprintf_p_l, _cwprintf_p, _cwprintf_p_l-printf()rounding behavior change_cprintf_s, _cprintf_s_l, _cwprintf_s, _cwprintf_s_l-printf()rounding behavior change_cprintf, _cprintf_l, _cwprintf, _cwprintf_l-printf()rounding behavior change_fprintf_p, _fprintf_p_l, _fwprintf_p, _fwprintf_p_l-printf()rounding behavior change_get_printf_count_output-printf()rounding behavior change_printf_p, _printf_p_l, _wprintf_p, _wprintf_p_l-printf()rounding behavior change_scprintf_p, _scprintf_p_l, _scwprintf_p, _scwprintf_p_l-printf()rounding behavior change_scprintf, _scprintf_l, _scwprintf, _scwprintf_l-printf()rounding behavior change_vcprintf_p, _vcprintf_p_l, _vcwprintf_p, _vcwprintf_p_l-printf()rounding behavior change_vcprintf_s, _vcprintf_s_l, _vcwprintf_s, _vcwprintf_s_l-printf()rounding behavior change_vscprintf, _vscprintf_l, _vscwprintf, _vscwprintf_l-printf()rounding behavior change_vsprintf_p, _vsprintf_p_l, _vswprintf_p, _vswprintf_p_l-printf()rounding behavior change_snprintf_s,_snprintf_s_l,_snwprintf_s,_snwprintf_s_l-printf()rounding behavior changeerrnoconstants - improve readabilityfprintf,_fprintf_l,fwprintf,_fwprintf_l-printf()rounding behavior changefreopen_s,_wfreopen_s- new C11 flagsfreopen,_wfreopen- added C11 flagspow,powf,powl- note change topow(T,int)starting in VS 2015 update 1printf_s,_printf_s_l,wprintf_s,_wprintf_s_l-printf()rounding behavior changesetlocale,_wsetlocale- clarified UTF-8 string modesprintf,_sprintf_l,swprintf,_swprintf_l,__swprintf_l-printf()rounding behavior changecprintf-printf()rounding behavior changefprintf_s, _fprintf_s_l, fwprintf_s, _fwprintf_s_l-printf()rounding behavior changesprintf_s, _sprintf_s_l, swprintf_s, _swprintf_s_l-printf()rounding behavior changestrcpy_s, wcscpy_s, _mbscpy_s, _mbscpy_s_l- fixed code examplesstrncat_s, _strncat_s_l, wcsncat_s, _wcsncat_s_l, _mbsncat_s, _mbsncat_s_l-printf()rounding behavior change- Type-generic math - updated the SDK version to use
vprintf, _vprintf_l, vwprintf, _vwprintf_l-printf()rounding behavior changevsprintf_s, _vsprintf_s_l, vswprintf_s, _vswprintf_s_l-printf()rounding behavior change
Updated articles
_variant_t::operator=- add remarks foroperator=and make the article easier to read.- Abstract classes (C++) - add Microsoft-specific extension information for inline pure virtual destructor
- Attributes in C++ - add missing errors and warnings: C7000-C7999, C4834
- char, wchar_t, char8_t, char16_t, char32_t - clarified whether char is signed or unsigned
Updated articles
- Introduction to Microsoft C++ for UNIX Users - Visual Studio 16.10 updates to C17 conformance
- Visual C++ What's New 2003 through 2015 - note change to
pow(T,int)starting in VS 2015 update 1
New articles
- Command-line error D8048
- Compiler Error C7510
- Compiler Error C7536
- Compiler errors C7000 through C7499
- Compiler errors C7500 through C7999
- Compiler Warning (error) C4597
- Compiler warning (level 1) C4834
- Compiler Warning (level 1) C5050
- Compiler warning (level 3) C4698
- Compiler Warning (level 3) C4768
- Compiler Warning (level 4) C4841
- Compiler Warning (level 4) C4843
- Compiler warning C5037
- Fatal Error C1090
Updated articles
- Compiler Error C2139 - added some version 2017 diagnostics
- Compiler Error C2201 - added some version 2017 diagnostics
- Compiler Error C2276 - update C2276
- Compiler Error C2668 - added some version 2017 diagnostics
- Compiler Error C2855 - add remarks about how to resolve this error
- Compiler errors C2000 - C3999, C7000 - C7999 - add missing errors and warnings: C7000-C7999, C4834
- Compiler errors C7500 through C7999 - added some version 2017 diagnostics; add error C7510; add missing errors and warnings: C7000-C7999, C4834
- Compiler Warning (level 1) C4179 - added some version 2017 diagnostics
- Compiler Warning (level 1) C5208 and Error C7626 - add missing errors and warnings: C7000-C7999, C4834
- Compiler Warning (level 4) C4189 - added some version 2017 diagnostics
- Compiler Warning C5038 - added some version 2017 diagnostics
- Compiler warnings by compiler version - update Visual Studio 16.10 conformance improvements and new warnings; Add new 16.10 warnings, version info; update version strings for Visual Studio 16.8, 16.9, and 16.10
- Compiler warnings C4400 Through C4599 - added some Visual Studio version 2017 diagnostics
- Compiler warnings C4800 through C5999 - update Visual Studio 16.10 conformance improvements and new warnings; add new 16.10 warnings, version info; added some version 2017 diagnostics; add missing errors and warnings: C7000 - C7999, C4834
- Vectorizer and parallelizer messages - add vectorizer failure reason 505; add 1204 reason code
Updated articles
- Microsoft Macro Assembler BNF Grammar - cleanup formatting and machine translation issues
New articles
- C++ Conformance improvements, behavior changes, and bug fixes in Visual Studio 2017
- Microsoft C++ docs: What's new for Visual Studio 16.8
- What's new for C++ in Visual Studio 2017
Updated articles
- C++ Conformance improvements, behavior changes, and bug fixes in Visual Studio 2017 - added version 2017 diagnostics
- C++ Conformance improvements, behavior changes, and bug fixes in Visual Studio 2019 - Visual Studio 16.10 updates to C17 conformance; update 16.10 conformance improvements and new warnings; add error C7510; add missing errors and warnings: C7000 - C7999, C4834; update conformance docs for 16.9
- C++ in Visual Studio - Visual Studio 16.10 updates to C17 conformance
- Install C11 and C17 support in Visual Studio - Visual Studio 16.10 updates to C17 conformance
- Microsoft C/C++ language conformance by Visual Studio version - Visual Studio 16.10 updates to C17 conformance; update conformance table for Visual Studio 16.10 and Visual Studio 16.9
- Microsoft C++ docs: What's new for Visual Studio 16.8 - Visual Studio 16.10 updates to C17 conformance
- What's new for C++ in Visual Studio 2017 - Visual Studio 16.10 updates to C17 conformance; update Visual Studio 16.9 release conformance docs
Updated articles
- Compiler warnings that are off by default - update Visual Studio 16.10 conformance improvements and new warnings; added some version 2017 diagnostics
- Predefined macros - add new Visual Studio 16.10 warnings, version info; update version strings for Visual Studio 16.8, 16.9, and 16.10
New articles
/external(External headers diagnostics)/headerName(Build a header unit from the specified header)/sourceDependencies:directives(List module and header unit dependencies)CMakePresets.jsonandCMakeUserPresets.jsonMicrosoft vendor maps- Configure and build with CMake Presets in Visual Studio
- HeaderUnit class
- Module class
- PrecompiledHeader class
- TRANSLATION_UNIT_TYPE enum
- TRANSLATION_UNIT_TYPE_DATA enum
- TranslationUnitType class
- Walkthrough: Build and import header units in Microsoft Visual C++
- Walkthrough: Import STL libraries as header units
Updated articles
- /experimental:module (Enable module support) - new content for header-units
- /Qspectre - update for VS 2019
- /Y (precompiled headers) - new content for header-units
/analyze(Code analysis) - update with up-to-date options list, add more information, and restructure for better organization of related options/await(Enable coroutine support) - add/await:strictfor Visual Studio 16.10/clr(Common Language Runtime Compilation) - include version for support of/clr:netcoreoption/exportHeader(Create header units) - add new content related to header-units/external(External headers diagnostics) -/externalnot experimental in Visual Studio 16.10/F(Set Stack Size) - update for VS 2019/FC(Full path of source code file in diagnostics) - Classify behavior by version./GL(Whole program optimization) - fix loc issue in /GL docs/headerUnit(Use header unit IFC) - new content for header-units/INTEGRITYCHECK(Require signature check) - updated signing guidance forintegritycheckbinaries/openmp(Enable OpenMP Support) - add /openmp:llvm compiler switch docs/reference(Use named module IFC) - new content for header-units/sourceDependencies(List all source-level dependencies) - new content for header-units/std(Specify Language Standard Version) - Visual Studio 16.10 updates to C17 conformance/translateInclude(Translate include directives into import directives) - new content for header-units- Advanced Property Page - add Windows Desktop Compatible property for Visual Studio 16.10; Add LLVM toolset version option for Visual Studio 16.9
- ARM Exception Handling - fix
ComputeXdataSizesamples for ARM/ARM64 - ARM64 exception handling - fix
ComputeXdataSizesamples for ARM/ARM64 - C++ Build Insights SDK: event table - add New C++ Build Insights Events to documentation
- Clang/LLVM support in Visual Studio projects - add LLVM toolset version option for Visual Studio 16.9; update clang-support-msbuild.md
- CMake projects in Visual Studio - add advanced details about using CMake file-api
- Compiler options listed alphabetically - new content for header-units
- Compiler options listed by category - new content for header-units
- Configure and build with CMake Presets in Visual Studio - improve readability
- General Property Page (Project) - add Windows Desktop Compatible property for Visual Studio 16.10
- Get started with C++ Build Insights - add New C++ Build Insights Events to documentation
- How to: Modify the Target Framework and Platform Toolset - improve readability
- Open Folder support for C++ build systems in Visual Studio - fix CppProperties.json MinGW-w64 contents
- Unicode support in the compiler and linker - add info about how to save using a different encoding
- Use the Microsoft C++ toolset from the command line - updated for VS 2019
- Walkthrough: Compile a C program on the command line - Visual Studio 16.10 updates to C17 conformance
- Walkthrough: Compiling a Native C++ Program on the Command Line - clarified notepad behavior when opening source file
New articles
<ranges>dayclassmonth_day_lastclassmonth_dayclassmonth_weekday_lastclassmonth_weekdayclassyear_monthclass
Updated articles
bitsetclass - improve readabilityvectorclass - fix typo in code sample
New articles
Updated articles
- C6031 - add note about ignoring a function's return value
- C26432 DEFINE_OR_DELETE_SPECIAL_OPS - update code examples
- C26497 USE_CONSTEXPR_FOR_FUNCTION - add note about when warning won't be issued
Updated articles
- Connect to your target Linux system in Visual Studio - add section about host key verification
- ConnectionManager reference - add note about host key fingerprint flags added in Visual Studio 16.10.
Updated articles
- Determining Which DLLs to Redistribute - updated for Visual Studio 2019
Updated articles
- C++ AMP Overview - add note about C++ AMP library deprecation
- Walkthrough: Debugging a C++ AMP application - fixed code sample
The following people contributed to the C++, C, and Assembler docs during this period. Thank you! See Microsoft Docs contributor guide overview if you'd like to learn how to contribute.
- 0xbadfca11 (1)
- bclehmann - Benjamin Lehmann (1)
- Brian-Taylor8 (1)
- cartwrightluke (2)
- ccawley2011 - Cameron Cawley (1)
- EddieBreeveld - Edward Breeveld (1)
- FrankAtHexagon - Frank Edwards (1)
- fsb4000 - Igor Zhukov (1)
- Jaiganeshkumaran - Jaiganesh Kumaran (2)
- jayvient - Jayvien (1)
- KishkinJ10 (1)
- kokosxD - kokos (1)
- langemol - Jacco Mol (1)
- MUzairS15 (1)
- nadavsu - Nadav (1)
- NegiAkash890 - Akash Negi (1)
- pjessesco - Jino Park (1)
- pramodkirchki (1)
- Radfordhound - Graham Scott (1)
- sapant-msft (1)
- sebgod - Sebastian Godelet (1)
- seedkar1 (1)
- ShamanCoder (1)
- sheila-stewart (1)
- softmac (1)
- Thieum - Matthieu Penant (2)
- tjs137 (1)
- urmyfaith - zx (1)
- ValZapod - Valerii Zapodovnikov (1)
- westinn - Nicolas Westin (1)
The following section provides the previous months of what's new in the Visual Studio docs.
New articles
Updated articles
- C Assignment Operators - lexical grammar update for C17
- C enumeration declarations - fixed lexical grammar
- C Keywords - lexical grammar update for C17
- C Lexical grammar - lexical grammar update for C17
- Parsing C Command-Line Arguments - Document exceptions to the rules for parsing C arguments
- Summary of C statements - updated for
__leave,__trykeywords - Summary of Declarations - lexical grammar update for C17
- Summary of Expressions - lexical grammar update for C17
- Type Qualifiers - added
restrict
New articles
Updated articles
_cwait- fixed code exampleassert Macro, _assert, _wassert- Clarified assert behaviorqsort- added note about stabilityrealloc- added C99 conformance notesround, roundf, roundl- Clarified rounding code examplesetlocale, _wsetlocale- added C Runtime UTF-8 support infovsnprintf_s, _vsnprintf_s, _vsnprintf_s_l, _vsnwprintf_s, _vsnwprintf_s_l- Clarified return values- Compatibility - added C99 conformance notes
- CRT Library Features - added C99 conformance notes
- Function family overview - added operator
newanddelete
Updated articles
- MSVC new preprocessor overview - updated preprocessor content
- Predefined macros - updated to Visual Studio 16.8 release notes, C11/C17
/stdsupport and SDK install docs
New articles
- C33001 - VC Code Analysis - add for new rules in Visual Studio 16.8
- C33004 - VC Code Analysis - add for new rules in Visual Studio 16.8
- C33005 - VC Code Analysis - add for new rules in Visual Studio 16.8
- C33010 - VC Code Analysis - add for new rules in Visual Studio 16.8
- C33011 - VC Code Analysis - add for new rules in Visual Studio 16.8
- C33020 - VC Code Analysis - add for new rules in Visual Studio 16.8
- C33022 - VC Code Analysis - add for new rules in Visual Studio 16.8
Updated articles
C6262- address cpp-docs.zh-tw issue 20C26401 DONT_DELETE_NON_OWNER- added example and Core Guidelines link to C26401C26402 DONT_HEAP_ALLOCATE_MOVABLE_RESULT- added example for C26402C26408 NO_MALLOC_FREE- added example and Core Guidelines link to C26408C26409 NO_NEW_DELETE- added example for C26409C26432 DEFINE_OR_DELETE_SPECIAL_OPS- added example for C26432C26434 DONT_HIDE_METHODS- added example for C26434C26436 NEED_VIRTUAL_DTOR- added example and Core Guidelines link to C26436C26439 SPECIAL_NOEXCEPT- added example and link to Core Guidelines for C26439C26440 DECLARE_NOEXCEPT- added example and link to Core Guidelines for C26440C26446 USE_GSL_AT- added an example for C26446C26447 DONT_THROW_IN_NOEXCEPT- adding example to C26447C26460 USE_CONST_REFERENCE_ARGUMENTS- added description and example to C26460C26461 USE_CONST_POINTER_ARGUMENTS:- added description and example to C26461C26462 USE_CONST_POINTER_FOR_VARIABLE- added description and example to C26462C26465 NO_CONST_CAST_UNNECESSARY- added example to C26465C26466 NO_STATIC_DOWNCAST_POLYMORPHIC- added Example to C26466C26471 NO_REINTERPRET_CAST_FROM_VOID_PTR- added Example to C26471C26474 NO_IMPLICIT_CAST- updated to clarify base/derived casesC26482 NO_DYNAMIC_ARRAY_INDEXING- added example to C26482C26483 STATIC_INDEX_OUT_OF_RANGE- added example to C26483C26490 NO_REINTERPRET_CAST- added example to C26490C26492 NO_CONST_CAST- added example to C26492C26493 NO_CSTYLE_CAST- added example to C26493C26494 VAR_USE_BEFORE_INIT- added example to C26494C26495 MEMBER_UNINIT- updated examples and links in C26495C26496 USE_CONST_FOR_VARIABLE- added example to C26496C26497 USE_CONSTEXPR_FOR_FUNCTION- added example to C26497
New articles
Updated articles
- Configure a Linux CMake project in Visual Studio - updated to reflect latest UI
- ConnectionManager reference - added commands for modify, clean
- Create a Linux MSBuild C++ project in Visual Studio - updated instructions to create a Linux project
- Deploy, run, and debug your Linux MSBuild project - added
GDB Path
New articles
- Compiler Warning (level 4) C4388 - added warning C4388, updated Visual Studio 16.7 warnings
Updated articles
- Compiler Error C3381 - address cpp-docs 2493; update remarks and example
- Compiler Warning (level 3) C4018 - updated Visual Studio 16.7 warnings
- Compiler Warning (level 4) C4389 - updated Visual Studio 16.7 warnings
- Compiler Warnings by compiler version - updated Visual Studio 16.7 warnings
- Compiler warnings C4800 through C5999 - updated Visual Studio 16.7 warnings
Updated articles
- C++ conformance improvements in Visual Studio - updated to Visual Studio 16.8 release notes
- C++ in Visual Studio - updated DevCom and Microsoft Docs Q&A links
- Microsoft C/C++ help and community - updated DevCom and Microsoft Docs Q&A links
- Microsoft C/C++ language conformance - updated C++20 library conformance table, update language feature table for Visual Studio 16.7
Updated articles
__restrictunion- fixed code snippet- if-else statement (C++) - added description for
if/elsegrammar
New articles
.vcxprojfiles and wildcards/headerUnit(Use header unit IFC)/module:exportHeader(Create header units)/module:reference(Use named module IFC)/translateInclude(Translate include directives into import directives)/Zc:preprocessor(Enable preprocessor conformance mode)
Updated articles
/clr(Common Language Runtime Compilation) - added description for/clr/permissive-(Standards conformance) - updated to Visual Studio 16.8 release notes- Importing data using
__declspec(dllimport)- updated example - pgosweep - added more pgosweep options
Updated articles
- How to: Use existing C++ code in a Universal Windows Platform app - reworked for clarity and updated examples
New articles
Updated articles
<bit>functions - updatednodiscardsyntax<ios>typedefs - updated examplebasic_string_viewClass - addedstarts_with(),ends_with()basic_stringClass - added_starts_with(),ends_with()ios_base ClassmapclassmultimapClass - addedcontains()multisetClass - addedcontains()setClass - addedcontains()unordered_mapClass - addedcontains()unordered_multimapClass - addedcontains()unordered_multisetClass - addedcontains()unordered_setClass - addedcontains()
The following people contributed to the C++, C, and Assembler docs during this period. Thank you! See Microsoft Docs contributor guide overview if you'd like to learn how to contribute.
- BeardedFish - Darian B. (1)
- codevenkat (1)
- definedrisk - Ben (3)
- eltociear - Ikko Ashimine (1)
- fsb4000 - Igor Zhukov (1)
- Jaiganeshkumaran - Jaiganesh Kumaran (1)
- jogo- (1)
- justanotheranonymoususer (1)
- matrohin - Dmitry Matrokhin (1)
- mhemmit (1)
- MSDN-WhiteKnight - MSDN.WhiteKnight (1)
- OdinTemple - Odin Temple (1)
- r00tdr4g0n - r00tdr4g0n (1)
- sebkraemer - Sebastian Krämer (1)
- vtjnash - Jameson Nash (1)
- yecril71pl - Christopher Yeleighton (4)
- Youssef1313 - Youssef Victor (1)
- zecozephyr - Jonathan Bailey (1)