Skip to content

Commit 234daef

Browse files
learn-build-service-prod[bot]huypubTylerMSFTprmerger-automator[bot]Learn Build Service GitHub App
authored
Confirm merge from FromPublicMasterBranch to main to sync with https://github.com/MicrosoftDocs/cpp-docs (branch main) (#4867)
* 3/31 AM Publish (#4859) * fix SAL annotation * acrolinx * go with _Out_opt_ and annotate the sample with why --------- Co-authored-by: TylerMSFT <[email protected]> Co-authored-by: prmerger-automator[bot] <40007230+prmerger-automator[bot]@users.noreply.github.com> * Update assert-asserte-assert-expr-macros.md (#4496) * 4/10/2023 AM Publish (#4868) * alt-text updates * acrolinx * fix image links, acrolinx * update alt-text * fixup text --------- Co-authored-by: TylerMSFT <[email protected]> Co-authored-by: James Barnett <[email protected]> * Update attributes.md (#4498) * 4/11/2023 AM Publish (#4869) * alt-text updates * acrolinx * fix image links, acrolinx * update alt-text * fixup text --------- Co-authored-by: TylerMSFT <[email protected]> Co-authored-by: James Barnett <[email protected]> * remove unneeded `To` * 4/12/2023 AM Publish (#4872) * alt-text updates * acrolinx * fix image links, acrolinx * update alt-text * fixup text --------- Co-authored-by: TylerMSFT <[email protected]> Co-authored-by: James Barnett <[email protected]> --------- Co-authored-by: huypub <[email protected]> Co-authored-by: learn-build-service-prod[bot] <113403604+learn-build-service-prod[bot]@users.noreply.github.com> Co-authored-by: TylerMSFT <[email protected]> Co-authored-by: prmerger-automator[bot] <40007230+prmerger-automator[bot]@users.noreply.github.com> Co-authored-by: Learn Build Service GitHub App <Learn Build Service [email protected]> Co-authored-by: LuShuchen <[email protected]> Co-authored-by: Taojunshen <[email protected]> Co-authored-by: James Barnett <[email protected]> Co-authored-by: Terry Mahaffey <[email protected]> Co-authored-by: Igor Zhukov <[email protected]> Co-authored-by: Shannon Leavitt <[email protected]>
1 parent 6ad6c62 commit 234daef

File tree

3 files changed

+39
-2
lines changed

3 files changed

+39
-2
lines changed

docs/c-runtime-library/reference/assert-asserte-assert-expr-macros.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Because the `_ASSERTE` macro specifies the failed expression, and `_ASSERT_EXPR`
4242
Unless you specify otherwise with the [`_CrtSetReportMode`](crtsetreportmode.md) and [`_CrtSetReportFile`](crtsetreportfile.md) functions, messages appear in a pop-up dialog box equivalent to setting:
4343
4444
```C
45-
_CrtSetReportMode(CRT_ASSERT, _CRTDBG_MODE_WNDW);
45+
_CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_WNDW);
4646
```
4747

4848
`_CrtDbgReportW` generates the debug report and determines its destination or destinations, based on the current report mode or modes and file defined for the `_CRT_ASSERT` report type. By default, assertion failures and errors are directed to a debug message window. The [`_CrtSetReportMode`](crtsetreportmode.md) and [`_CrtSetReportFile`](crtsetreportfile.md) functions are used to define the destinations for each report type.

docs/cpp/attributes.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,3 +130,40 @@ void f() {
130130
### `[[msvc::no_tls_guard]]`
131131

132132
The Microsoft-specific `[[msvc::no_tls_guard]]` attribute disables checks for initialization on first access to thread-local variables in DLLs. The checks are enabled by default in code built using Visual Studio 2019 version 16.5 and later versions. This attribute applies only to the specific variable that follows it. To disable checks globally, use the [`/Zc:tlsGuards-`](../build/reference/zc-tlsguards.md) compiler option.
133+
134+
### `[[msvc::forceinline]]`
135+
136+
This Microsoft specific `[[msvc::forceinline]]` attribute has the same meaning as `__forceinline` when placed before a function declaration.
137+
138+
### `[[msvc::forceinline_calls]]`
139+
140+
This Microsoft specific `[[msvc::forceinline_calls]]` attribute can be placed on before a statement or a block, and will cause the inline heurisitc to attempt to forceinline all calls in that statement or block:
141+
142+
```cpp
143+
void f() {
144+
[[msvc::forceinline_calls]]
145+
{
146+
foo();
147+
bar();
148+
}
149+
...
150+
[[msvc::forceinline_calls]]
151+
bar();
152+
153+
foo();
154+
}
155+
```
156+
157+
Here, the first call to `foo` and both calls to `bar` will be treated as if they were declared `__forceinline`, but not the second call to `foo`.
158+
159+
### `[[msvc::noinline]]`
160+
161+
This Microsoft specific `[[msvc::noinline]]` attribute has the same meaning as `declspec(noinline)` when placed before a function declaration.
162+
163+
### `[[msvc::noinline_calls]]`
164+
165+
This Microsoft specific `[[msvc::noinline_calls]]` attribute has the same usage as `[[msvc::forceinline_calls]]`, and can be placed before any statement or block. Rather than forceinlining all calls in that block, however, it has the effect of turning off inlining for the scope to which it is applied.
166+
167+
### `[[msvc::flatten]]`
168+
169+
This Microsoft specific `[[msvc::flatten]]` attribute is very similar to `[[msvc::forceinline_calls]]`, and can be used in the same places and in the same way. The difference is flatten will dutifully forceinline all calls in the scope to which it is applied recursively, until no calls are left. This may have consequences for the resulting code size growth of the function or the throughput of the compiler, which the user must manage manually.

docs/data/installing-database-support-mfc-atl.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ ms.custom: intro-installation
88
---
99
# Installing Database Support (MFC/ATL)
1010

11-
Visual C++ does not include any database products. To
11+
Visual C++ does not include any database products.
1212

1313
## See also
1414

0 commit comments

Comments
 (0)