Skip to content

Commit a8297be

Browse files
TaojunshenMohammadHadi2031Colin Robertsonopbld17PRMerger15
authored
1/11/2021 AM Publish (#4036)
* Add Visual Studio 2022 Platform Toolset Version * Add /fpcvt compiler option docs (#3886) * Add /fpcvt compiler option docs * Fix copypasta error * Update fp conversion intrinsics, too. * Replace deleted table row * Acrolinx pass * Fix TOC issues * Add useful links to intrinsics * Updates per John Morgan, plus acrolink * Update version info * Clean up rvalue reference article * Fix to `/fpcvt` per John Morgan email * Reformat WeakRef class document. * Update Advanced prop page and C1107 * Remove unrelated change. * Minimizing entity form of & (#3916) * Initial pass minimizing on &gt; entities (#3919) * Initial pass on &gt; entities * Fix everything. * Try without `&lt;` entities in title/desc * Clean up pass * Update docs/atl-mfc-shared/reference/cfiletime-class.md Co-authored-by: Tracey Torble <[email protected]> * Update tn026-ddx-and-ddv-routines.md `DoDialogExchange` -> `DoDataExchange` * Fix incorrect import example * github fix 3544 * GITHUB FIX FOR #3549 * Add UWP to list of unsupported ASAN features. * Fix misnamed mt.exe options. Acrolinx all. * Attempt fpcvt simplification per John Morgan. * Fix cpp-docs 3546 * Address complaint in cpp-docs 3554 (#3950) * Add section on CMake partial activation * 17.1 Update warnings, fix cpp-docs 3563 (#3954) * 17.1 Update warnings, fix cpp-docs 3563 * fix date * Add `/Zc:externC` compiler option doc, fix 1594 * Tweaks. * Fix links, header syntax issues * Fix issues in XML Docs reference * Make list match apparently intended style * Fix broken link. * Add docs for new check Signed-off-by: Kyle Reed <[email protected]> * fix toc * remove .md from toc title * Revert "Add docs for new linter check" * update runtime spelling * Bulk fix: remove HTML entities from yml headers (#3962) * Style and content fixes in cpp language docs * Changing confusing wording about C++ exceptions * Bulk fix HTML entities in H1 (#3966) * Fix lt-gt entity pairs * Bulk fix of `&lt;`-`&gt;` pairs in H1 headings * Oops, deleted initial `#` * Fix two more H1 issues * update with existing .openpublishing.publish.config.json * C++ tutorial landing page, attempt 2 * Revert redirection of get-started index.yml file * Fix typo * Bulk fix `&lt;`, `&gt;`, and `.period;` entities * operatoroperator * `/hotpatch`: No jump to the first instruction * Update Acrolinx for main branch * Change learn about item type * Add get started TOC * fix over machine translation problems (#3977) * fix over machine translation problems * acrolinx and misses * markdown fixes Co-authored-by: TylerMSFT <[email protected]> * Make the grammar bot happy * Fix things that look like parameters. (#3978) * Fix things that look like parameters. * Acrolinxy * Misc fixes * Other fixes * Fix typos * Acrolinx some more * [17.0] Update links to download Visual Studio (#3981) * Update links to download Visual Studio * Remove VS 2019 reference * Address cpp-docs 3565 * Also cpp-docs 439 * cpp-docs 947 * cpp-docs 1002 * accuratized * cpp-docs 1035 * Twhitney named modules (#3960) * draft * draft * draft * fix links * cleanup * added some more info * add some see also references * cleanup pass * remove text about overloads * tech review * little better wording * a little more word smithing * fix link * acrolinx * readthrough pass * Readthrough to test building the project * acrolinx * rename media file Co-authored-by: TylerMSFT <[email protected]> * cpp-docs 1305 * cpp-docs 1324 * address github issue #3524 and add code escape to prevent over machine translation * missed a couple escapes * couple more code escapes * one more escape * Address cpp-docs 3583: LNK1107 clarity * Tweaks * tweak formatting * Expand on fix for cpp-docs 1035 (#3986) * Expand of fix for cpp-docs 1035 * Mention overloads. * Grammar and formatting fixes * add summary of what will learn in module * [17.1p2] Add docs for comparison/bitwise c++ linter check. (#3964) * Revert "Revert "Add docs for new linter check"" This reverts commit e56971f. * PR feedback Signed-off-by: Kyle Reed <[email protected]> * Update cmake-presets-vs.md * Update cmake-presets-vs.md * Switch http to https and fix broken links * Acrolinx * Style pass for the grammar checker bot * Fix two incorrect conditions in the ARM packed exception handling For the prologue, the distinction between `mov r11, sp` and `add r11, sp, #xx` lies only in whether other registers are pushed before R11 and LR in prologue instruction 2. (The condition `R`==1 and `PF`==0 corresponds to no other registers pushed before `r11`.) The `L` flag doesn't affect it (and the documentation explicit says that when `C` is set, then `L` also must be set, thus `C`==1 and `L`==0 is tautological too). This was correctly described in the textual form, but the conditions in the table included one erronous case. For the epilogue, when `Ret`!=0, the function doesn't return by popping LR directly into PC, but with an explicit branch instruction (10a or 10b). In this case, if `L`==1, the LR register is included in the list of registers popped in instruction 8. If register homing is used (`H`==1), then instruction 9a is used instead of 9b. This case seemed to have been overlooked both in the textual description and in the table. Also, when prologue instruction form 3a is used, clarify that it corresponds to the unwind code FB (narrow nop) only, that unwinding such a prologue doesn't restore `sp` from `r11`. Also fix a typo and clarify that encodings with C=1, L=0 are invalid. * Address cpp-docs 3588 error in link commands (#3996) * Address cpp-docs 3588 error in link commands * Update ms.date * Acrolinx fixes to frontrun cpp-docs 3541 * Post-3541 acrolinx pass * Update how-to-marshal-structures-using-cpp-interop.md Change "=" into "-" * Add _CountOneBits[64] to the ARM64 intrinsic doc * Update .acrolinx-config.edn update to reflect default branch name change * Mark first code block as C++ Syntax highlighting did not work for the `using identifier = type;` block due to missing language information. * Fixed grammatical error in allocator-class.md "Constructing a container with a custom allocator provide control over allocation and freeing of that container's elements." -> "Constructing a container with a custom allocator provides control over allocation and freeing of that container's elements." * Update d-using-the-schedule-clause.md * Correct a word in the remarks of /DIRECTIVES. The section is .drectve instead of .drective. * std::is_standard_layout<Derived> * Make meaning clearer This makes the meaning clearer to me. The ". Or," seems like to strong of a separator for closely related phrases. * Update value-types-modern-cpp.md Commas to make the meaning clearer * add missing usage of CopyChars * update json examples (#4017) * update json examples * acrolinx Co-authored-by: TylerMSFT <[email protected]> * fix github issue #3600 * formatting cleanup and acrolinx * Address cpp-docs issues 3601 3622 3626 * Update deprecating-types-and-members-c-cx.md * PR review edit / relative link syntax * add code escape to prevent overtranslation * fix missed code elements and acrolinx * more cleanup * github fixes for #3635 and #3636 (#4026) * github fixes for #3635 and #3636 * acrolinx and cleanup * nit Co-authored-by: TylerMSFT <[email protected]> * Update windows-store-apps-the-windows-runtime-and-the-c-run-time.md * Broken link fixed (#4025) * Implement intrinics broken link fixes (#4028) * Update deprecating-types-and-members-c-cx.md Add code formatting to links to prevent overlocalization and markdown processing issues. * Update windows-store-apps-the-windows-runtime-and-the-c-run-time.md * Follow-up cpp-docs 3637 for style and Acrolinx * [17.0] Add compiler option `/option:strict` (#4002) Co-authored-by: MohammadHadi Attarieh <[email protected]> Co-authored-by: Colin Robertson <[email protected]> Co-authored-by: opbld17 <[email protected]> Co-authored-by: PRMerger15 <[email protected]> Co-authored-by: PRMerger10 <[email protected]> Co-authored-by: Haig MacGregor <[email protected]> Co-authored-by: Tracey Torble <[email protected]> Co-authored-by: Waiting <[email protected]> Co-authored-by: opbld15 <[email protected]> Co-authored-by: opbld16 <[email protected]> Co-authored-by: roxk <[email protected]> Co-authored-by: TylerMSFT <[email protected]> Co-authored-by: Tyler Whitney <[email protected]> Co-authored-by: Laura Brenner <[email protected]> Co-authored-by: branh <[email protected]> Co-authored-by: John Ellison <[email protected]> Co-authored-by: PRMerger8 <[email protected]> Co-authored-by: PRMerger17 <[email protected]> Co-authored-by: Sam Freed <[email protected]> Co-authored-by: Colin Cooper <[email protected]> Co-authored-by: Paula Miller <[email protected]> Co-authored-by: Kyle Reed <[email protected]> Co-authored-by: Hannes Harnisch <[email protected]> Co-authored-by: Anna Huff <[email protected]> Co-authored-by: Ying Hua <[email protected]> Co-authored-by: Alex Guteniev <[email protected]> Co-authored-by: Dennis Rea <[email protected]> Co-authored-by: PRMerger3 <[email protected]> Co-authored-by: PRMerger18 <[email protected]> Co-authored-by: PRMerger Service account 2 <[email protected]> Co-authored-by: Jonathan Sweemer <[email protected]> Co-authored-by: Martin Storsjö <[email protected]> Co-authored-by: Kristine Toliver <[email protected]> Co-authored-by: AndreaLu <[email protected]> Co-authored-by: Matt Gardner <[email protected]> Co-authored-by: Sarah Vilaysom <[email protected]> Co-authored-by: Matthias <[email protected]> Co-authored-by: James Oswald <[email protected]> Co-authored-by: Anton Curmanschii <[email protected]> Co-authored-by: ROOOO <[email protected]> Co-authored-by: luozhiya <[email protected]> Co-authored-by: Zane Hitchcox <[email protected]> Co-authored-by: Chris Ho <[email protected]> Co-authored-by: PRMerger5 <[email protected]> Co-authored-by: Jaiganesh Kumaran <[email protected]> Co-authored-by: Jak Koke <[email protected]> Co-authored-by: atikmapari <[email protected]> Co-authored-by: Linda Spiller <[email protected]>
1 parent e3558d4 commit a8297be

File tree

2 files changed

+66
-66
lines changed

2 files changed

+66
-66
lines changed
Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,21 @@
11
---
22
description: "Learn more about: Deprecating types and members (C++/CX)"
33
title: "Deprecating types and members (C++/CX)"
4-
ms.date: "12/30/2016"
5-
ms.assetid: b20b01c1-a439-4ff0-8cf3-d7280c492813
4+
ms.date: 01/07/2022
5+
no-loc: [ "class", "delegate", "enum", "field", "interface", "method", "property", "struct" ]
66
---
77
# Deprecating types and members (C++/CX)
88

9-
In C++/CX, deprecation of Windows Runtime types and members for producers and consumers by using the [Deprecated](/uwp/api/windows.foundation.metadata.deprecatedattribute) attribute is supported. If you consume an API to which this attribute has been applied, you get a compile-time warning message that indicates that the API is deprecated and also recommends an alternative API to use. In your own public types and methods, you can apply this attribute and supply your own custom message.
9+
C++/CX supports deprecation of Windows Runtime types and members for producers and consumers by using the [`Deprecated`](/uwp/api/windows.foundation.metadata.deprecatedattribute) attribute. If you consume an API that has this attribute, you get a compile-time warning message. It indicates that the API is deprecated and also recommends an alternative API to use. In your own public types and methods, you can apply this attribute and supply your own custom message.
1010

1111
> [!CAUTION]
12-
> The [`Deprecated`](/uwp/api/windows.foundation.metadata.deprecatedattribute) attribute is for use only with Windows Runtime types. For standard C++ classes and members, use
13-
[`[[deprecated]]`](../cpp/deprecated-cpp.md) (C++14 and later) or [`__declspec(deprecated)`](../cpp/deprecated-cpp.md).
12+
> The [`Deprecated`](/uwp/api/windows.foundation.metadata.deprecatedattribute) attribute is for use only with Windows Runtime types. For standard C++ classes and members, use [`[[deprecated]]`](../cpp/deprecated-cpp.md) (C++14 and later) or [`__declspec(deprecated)`](../cpp/deprecated-cpp.md).
1413
15-
### Example
14+
## Example
1615

17-
The following example shows how to deprecate your own public APIs—for example, in a Windows Runtime component. The second parameter, of type [Windows:Foundation::Metadata::DeprecationType](/uwp/api/windows.foundation.metadata.deprecationtype) specifies whether the API is being deprecated or removed. Currently only the DeprecationType::Deprecated value is supported. The third parameter in the attribute specifies the [Windows::Foundation::Metadata::Platform](/uwp/api/windows.foundation.metadata.platformattribute) to which the attribute applies.
18-
19-
```
16+
The following example shows how to deprecate your own public APIs—for example, in a Windows Runtime component. The second parameter, of type [`Windows:Foundation::Metadata::DeprecationType`](/uwp/api/windows.foundation.metadata.deprecationtype) specifies whether the API is being deprecated or removed. Currently only the `DeprecationType::Deprecated` value is supported. The third parameter in the attribute specifies the [`Windows::Foundation::Metadata::Platform`](/uwp/api/windows.foundation.metadata.platformattribute) to which the attribute applies.
2017

18+
```cpp
2119
namespace wfm = Windows::Foundation::Metadata;
2220

2321
public ref class Bicycle sealed
@@ -33,29 +31,29 @@ public:
3331

3432
## Supported targets
3533

36-
The following table lists the constructs to which the Deprecated attribute may be applied:
34+
The following table lists the constructs to which the `Deprecated` attribute may be applied:
3735

3836
:::row:::
3937
:::column span="":::
4038
class\
41-
delegate\
4239
enum\
43-
enum field\
4440
event\
45-
interface
41+
method\
42+
property\
43+
struct field
4644
:::column-end:::
4745
:::column span="":::
48-
method\
46+
delegate\
47+
enum field\
48+
interface\
4949
parameterized constructor\
50-
property\
5150
struct\
52-
struct field\
5351
XAML control
5452
:::column-end:::
5553
:::row-end:::
5654

5755
## See also
5856

59-
[Type System](../cppcx/type-system-c-cx.md)<br/>
60-
[C++/CX Language Reference](../cppcx/visual-c-language-reference-c-cx.md)<br/>
61-
[Namespaces Reference](../cppcx/namespaces-reference-c-cx.md)
57+
[Type system (C++/CX)](../cppcx/type-system-c-cx.md)\
58+
[C++/CX language reference](../cppcx/visual-c-language-reference-c-cx.md)\
59+
[Namespaces reference](../cppcx/namespaces-reference-c-cx.md)

0 commit comments

Comments
 (0)