Skip to content

Commit

Permalink
polish (#2412)
Browse files Browse the repository at this point in the history
  • Loading branch information
stevewhims authored Mar 30, 2022
1 parent 1e8b1d1 commit e29fdc7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion windows-apps-src/cpp-and-winrt-apis/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ Also see [Where can I find C++/WinRT sample apps?](./faq.yml#where-can-i-find-c-
| [Windows Runtime components with C++/WinRT](../winrt-components/create-a-windows-runtime-component-in-cppwinrt.md) | This topic shows how to use C++/WinRT to create and consume a Windows Runtime component—a component that's callable from a Universal Windows app built using any Windows Runtime language. |
| [Authoring a C# Windows Runtime component for use from a C++/WinRT app](../cpp-and-winrt-apis/use-csharp-component-from-cpp-winrt.md) | This topic walks you through the process of adding a simple C# component to your C++/WinRT project. |
| [Visual Studio native debug visualization (natvis) for C++/WinRT](./natvis.md) | The [C++/WinRT Visual Studio Extension (VSIX)](https://marketplace.visualstudio.com/items?itemName=CppWinRTTeam.cppwinrt101804264) gives you Visual Studio native debug visualization (natvis) of C++/WinRT projected types. This provides you an experience similar to C# debugging. |
| [Configuration macros](./macros.md) | Descriptions of the C++/WinRT configuration macros. |
| [Configuration macros](./macros.md) | This topic describes the C++/WinRT configuration macros. |
| [C++/WinRT naming conventions](./naming.md) | This topic explains naming conventions that C++/WinRT has established. |

### Topics about the C++ language
Expand Down
13 changes: 7 additions & 6 deletions windows-apps-src/cpp-and-winrt-apis/macros.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
---
title: C++/WinRT configuration macros
description: Descriptions of the C++/WinRT configuration macros.
description: This topic describes the C++/WinRT configuration macros.
ms.date: 03/29/2022
ms.topic: article
keywords: windows 10, uwp, standard, c++, cpp, winrt, projection, configuration, macros
ms.localizationpriority: medium
---

# C++/WinRT configuration macros
Unless otherwise noted, these rules apply to C++/WinRT configuration macros:

This topic describes the C++/WinRT configuration macros. Unless otherwise noted, these rules apply to all of the C++/WinRT configuration macros:

* All files that are linked together to form a single module (`.exe` or `.dll`) must have identical macro settings. That includes static libraries.
* All macro settings must be complete before including any C++/WinRT header file.
Expand All @@ -33,20 +34,20 @@ These macros allow you to customize assertion handling. **WINRT_ASSERT** doesn't

If you don't customize these macros, and **_DEBUG** is defined, then C++/WinRT makes them equivalent to **_ASSERTE**.

If you don't customize these macros, and **_DEBUG** is not defined, then C++/WinRT defines **WINRT_ASSERT** to discard the expression unevaluated, and **WINRT_VERIFY** to discard the expression after evaluating it.
If you don't customize these macros, and **_DEBUG** is not defined, then C++/WinRT defines **WINRT_ASSERT** to discard the expression unevaluated, and defines **WINRT_VERIFY** to discard the expression after evaluating it.

## WINRT_NO_MAKE_DETECTION
If defined, disables the default C++/WinRT diagnostic that detects that you constructed an implementation class without using [**winrt::make**](/uwp/cpp-ref-for-winrt/make).
If defined, disables the default C++/WinRT diagnostic that detects that you mistakenly constructed an implementation class without using [**winrt::make**](/uwp/cpp-ref-for-winrt/make).

We strongly recommended that you not define this symbol, because it masks a common source of programming errors.
We strongly recommended that you don't define this symbol, because doing so masks a common source of programming errors.

## WINRT_DIAGNOSTICS
If defined, enables internal statistics to track various operations:
* The number of times each interface was queried.
* The number of times each factory was requested (and whether the factory is agile).

## WINRT_NATVIS
If defined, includes helper functions to assist in native debug visualizations in Visual Studio. The code is not used at runtime; it exists only for debugging.
If defined, includes helper functions to assist in native debug visualizations in Visual Studio. The code isn't used at runtime; it exists only for debugging.

If you don't customize this macro, then visualization support functions are enabled if **_DEBUG** is defined. For more details, see [Visual Studio native debug visualization (natvis) for C++/WinRT](natvis.md).

Expand Down

0 comments on commit e29fdc7

Please sign in to comment.