Skip to content

Commit b2ae94b

Browse files
TaojunshenTylerMSFTSteve Wishnouskyrachana-sataoopbld15
authored
4/29/2022 AM Publish (MicrosoftDocs#4254)
* correction regarding CStringA * Update open-wopen.md Clarify that _O_TEMPORARY sets FILE_SHARE_DELETE. * Update other pages that mention _O_TEMPORARY effects. * New article - IDL method wizard * update after review * update after review * Update after review * Update after review * Updating - Add property wizard for VS2022 * Updating broken links * Update after review * New article - Add an IDL Property * link updation * Update after review * update after review * update after review * New article - IDL MFC property wizard * Broken link fixed * Broken link fixed * Update virtual-functions.md * update for links * Updating links * Address cpp-docs 3780 3782 3790 3791 3805 * Attempt correction of table format * Add documentation for compiler error C2956 and update error text (MicrosoftDocs#4176) * Add documentation for compiler error C2956 and update error text * Add TOC entry * Update for grammar and my own comprehension. Sometimes, you just get carried away. This version could use some simplification. * Simplify. Address remarks, attempt simplification. Acrolinx all the things. * More updates per review Co-authored-by: Colin Robertson <corob@microsoft.com> * Address cpp-docs 3816 * Address non-blocking issues from 4207 * fix for sample program. * edits * edit pass. Move to ide location * minor edit * fix link * Final update * final update * final update * resolving blocking issue * resolving blocking issue * ToC update for new article * ToC update * link update * Correct inconsistent formatting for the `_O_EXCL` constant in the docs for the open functions * Update c28195.md * Update in alt-text * Update in alt-text * Final Update- See also section * edit pass * edit pass * more cleanup * typo * small edit * Final update * edit pass * edit pass * formatting for scannability * acrolinx * one more try at spacing * final update * VMCS -> VMXON According to the intel IA32 development manual (Volume 3 C3 23.7): "Before executing VMXON, software should allocate a naturally aligned 4-KByte region of memory that a logical processor may use to support VMX operation. This region is called the VMXON region." * edit and add links * fix links * add code example * click->tick * Update date, link to Intel docs * Another go at updating the description * Fix stray double-quote * Address issue in DD PR 1393452 * add /interface and /internal-partition - draft (MicrosoftDocs#4227) * add /interface and /internal-partition - draft * add example * fix formatting * update text regarding example * tech review * link updates * fix switch name and link * edits * reorder version info * cleanup * add /tp flag * fix command line Co-authored-by: TylerMSFT <Tyler.Whitney@microsoft.com> * Update os-ot-favor-small-code-favor-fast-code.md Change "minimize or maximize size" to "minimize size or maximize speed" * Expand into a whole SEO-friendly sentence * Clarify when _matherr will be invoked (#4230) Customer here https://developercommunity.visualstudio.com/t/_matherr-example-does-not-work-for-me/1676341#T-ND10016474 expressed confusion over when _matherr is called. This change points out that the only setting that will enable/disable this is the presence of _matherr, but it will not be triggered when using intrinsics. * acrolinx and other fixes * fix typo * more code escape * another code escape * better formatting for retval possibilities * fix backslashes * incorp feedback * SEO work * acrolinx * SEO work (MicrosoftDocs#4234) * SEO work * acrolinx Co-authored-by: TylerMSFT <Tyler.Whitney@microsoft.com> * SEO work * incorp feedback * better link description * incorp review feedback * fix location of graphic * fix github issue#3845 * acrolinx * Twhitney seo (MicrosoftDocs#4239) * seo adjustments * update toc * fix links * acrolinx pass * incorp feedback Co-authored-by: TylerMSFT <Tyler.Whitney@microsoft.com> * add info about converting narrow and wide strings * fix link * fix another link * Fixes for F1 issues in DD 1524526 * minor cleanup * Minimal acrolinx fixes * acrolinx * minor cleanup * acrolinx * going for 100% acrolinx * incorp feedback * make instructions for control panel slightly better * Update attributes.md We had 2 feedback bugs for likely/unlikely where customers commented about block reordering optimization not happening when they specify these attributes. As per the request of one of the feedback tickets, adding a specific note about this optimization not being implemented yet in the compier. https://developercommunity.visualstudio.com/t/Gy-changes-C20-branch-hint-optimiza/10023042#T-ND10024186 https://developercommunity.visualstudio.com/t/likely--unlikely-should-avoid-c/1603545 * Edits to improve SEO and usability (#4246) * Article clean-up * Set date. * Update docs/build-insights/reference/sdk/c-event-data-types/event-data-struct.md Co-authored-by: Shannon Leavitt <V-SHLEAV@microsoft.com> * Acrolynx style, date update Co-authored-by: TylerMSFT <Tyler.Whitney@microsoft.com> Co-authored-by: Steve Wishnousky <stwish@microsoft.com> Co-authored-by: rachana-satao <83084319+rachana-satao@users.noreply.github.com> Co-authored-by: opbld15 <opbld15@microsoft.com> Co-authored-by: Colin Robertson <corob@microsoft.com> Co-authored-by: opbld16 <opbld16@microsoft.com> Co-authored-by: opbld17 <opbld17@microsoft.com> Co-authored-by: atikmapari <31974726+atikmapari@users.noreply.github.com> Co-authored-by: PRMerger19 <prmrgr19@microsoft.com> Co-authored-by: Ming Ho <94572161+homing1@users.noreply.github.com> Co-authored-by: PRMerger5 <prmergr5@microsoft.com> Co-authored-by: Regan Downer <97987445+v-regandowner@users.noreply.github.com> Co-authored-by: Jonathan Emmett <joemmett@microsoft.com> Co-authored-by: Tamara K <93546702+tamarakhader@users.noreply.github.com> Co-authored-by: PRMerger17 <prmrgr17@microsoft.com> Co-authored-by: Paula Miller <v-paulmi@microsoft.com> Co-authored-by: Martin Storsjö <martin@martin.st> Co-authored-by: Sunny Chatterjee <sunnych@microsoft.com> Co-authored-by: Tyler Whitney <TylerMSFT@users.noreply.github.com> Co-authored-by: Colin Cooper <72402153+v-ccolin@users.noreply.github.com> Co-authored-by: krispy <monstertyo@gmail.com> Co-authored-by: PRMerger8 <prmrgr8@microsoft.com> Co-authored-by: PRMerger10 <prmrgr10@microsoft.com> Co-authored-by: Tech Stuff <103606018+teknixstuff@users.noreply.github.com> Co-authored-by: Dennis Rea <v-denrea@microsoft.com> Co-authored-by: Anna Huff <92125952+AnnaMHuff@users.noreply.github.com> Co-authored-by: PRMerger13 <prmrgr13@microsoft.com> Co-authored-by: PRMerger7 <prmrgr7@microsoft.com> Co-authored-by: PRMerger Service account 2 <PRMerger-2@users.noreply.github.com> Co-authored-by: prjoseph <11891358+prjoseph@users.noreply.github.com> Co-authored-by: Tim Sherer <28902327+TimShererWithAquent@users.noreply.github.com> Co-authored-by: Shannon Leavitt <V-SHLEAV@microsoft.com>
1 parent d7453a4 commit b2ae94b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/cpp/attributes.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: "Learn more about: Attributes in C++"
33
title: "Attributes in C++"
4-
ms.date: 04/18/2021
4+
ms.date: 04/27/2022
55
---
66
# Attributes in C++
77

@@ -52,9 +52,9 @@ Attributes represent a standardized alternative to vendor-specific extensions su
5252
5353
- `[[maybe_unused]]` **Visual Studio 2017 version 15.3 and later:** (Available with [`/std:c++17`](../build/reference/std-specify-language-standard-version.md) and later.) Specifies that a variable, function, class, typedef, non-static data member, enum, or template specialization may be intentionally unused. The compiler doesn't warn when an entity marked `[[maybe_unused]]` isn't used. An entity that's declared without the attribute can later be redeclared with the attribute and vice-versa. An entity is considered *marked* after its first declaration that's marked `[[maybe_unused]]` gets analyzed, and for the rest of the current translation unit.
5454
55-
- `[[likely]]` **Visual Studio 2019 version 16.6 and later:** (Available with [`/std:c++20`](../build/reference/std-specify-language-standard-version.md) and later.) Specifies a hint to the compiler that the code path for the attributed label or statement is more likely to execute than alternatives. In the Microsoft compiler, the `[[likely]]` attribute marks blocks as "hot code", which increments an internal optimization score. The score is incremented more when optimizing for speed, and not as much when optimizing for size. The net score affects the likelihood of inlining, loop unrolling, and vectorizing optimizations. The effect of `[[likely]]` and `[[unlikely]]` is similar to [Profile-guided optimization](../build/profile-guided-optimizations.md), but limited in scope to the current translation unit.
55+
- `[[likely]]` **Visual Studio 2019 version 16.6 and later:** (Available with [`/std:c++20`](../build/reference/std-specify-language-standard-version.md) and later.) Specifies a hint to the compiler that the code path for the attributed label or statement is more likely to execute than alternatives. In the Microsoft compiler, the `[[likely]]` attribute marks blocks as "hot code", which increments an internal optimization score. The score is incremented more when optimizing for speed, and not as much when optimizing for size. The net score affects the likelihood of inlining, loop unrolling, and vectorizing optimizations. The effect of `[[likely]]` and `[[unlikely]]` is similar to [Profile-guided optimization](../build/profile-guided-optimizations.md), but limited in scope to the current translation unit. The block re-ordering optimization is not yet implemented for this attribute.
5656
57-
- `[[unlikely]]` **Visual Studio 2019 version 16.6 and later:** (Available with [`/std:c++20`](../build/reference/std-specify-language-standard-version.md) and later.) Specifies a hint to the compiler that the code path for the attributed label or statement is less likely to execute than alternatives. In the Microsoft compiler, the `[[unlikely]]` attribute marks blocks as "cold code", which decrements an internal optimization score. The score is decremented more when optimizing for size, and not as much when optimizing for speed. The net score affects the likelihood of inlining, loop unrolling, and vectorizing optimizations.
57+
- `[[unlikely]]` **Visual Studio 2019 version 16.6 and later:** (Available with [`/std:c++20`](../build/reference/std-specify-language-standard-version.md) and later.) Specifies a hint to the compiler that the code path for the attributed label or statement is less likely to execute than alternatives. In the Microsoft compiler, the `[[unlikely]]` attribute marks blocks as "cold code", which decrements an internal optimization score. The score is decremented more when optimizing for size, and not as much when optimizing for speed. The net score affects the likelihood of inlining, loop unrolling, and vectorizing optimizations. The block re-ordering optimization is not yet implemented for this attribute.
5858
5959
## Microsoft-specific attributes
6060

0 commit comments

Comments
 (0)