From 92eb29ea67188c418a74ddb3896d068f8ed72a6f Mon Sep 17 00:00:00 2001 From: Rageking8 <106309953+Rageking8@users.noreply.github.com> Date: Sat, 2 Aug 2025 22:02:44 +0800 Subject: [PATCH 1/5] Remove space before closing parenthesis in title of "Namespaces and Type Visibility (C++/CX)" topic --- docs/cppcx/namespaces-and-type-visibility-c-cx.md | 6 +++--- docs/cppcx/toc.yml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/cppcx/namespaces-and-type-visibility-c-cx.md b/docs/cppcx/namespaces-and-type-visibility-c-cx.md index 83ed1947d7..2b6464f126 100644 --- a/docs/cppcx/namespaces-and-type-visibility-c-cx.md +++ b/docs/cppcx/namespaces-and-type-visibility-c-cx.md @@ -1,10 +1,10 @@ --- -description: "Learn more about: Namespaces and Type Visibility (C++/CX )" -title: "Namespaces and Type Visibility (C++/CX )" +description: "Learn more about: Namespaces and Type Visibility (C++/CX)" +title: "Namespaces and Type Visibility (C++/CX)" ms.date: "12/30/2016" ms.assetid: cbc01a3a-3b69-4ded-9c42-ecbf0fd0a00e --- -# Namespaces and Type Visibility (C++/CX ) +# Namespaces and Type Visibility (C++/CX) A namespace is a standard C++ construct for grouping types that have related functionality and for preventing name collisions in libraries. The Windows Runtime type system requires that all public Windows Runtime types, including those in your own code, must be declared in a namespace at namespace scope. Public types that are declared at global scope or nested inside another class will cause a compile-time error. diff --git a/docs/cppcx/toc.yml b/docs/cppcx/toc.yml index edc76e601e..12708f934f 100644 --- a/docs/cppcx/toc.yml +++ b/docs/cppcx/toc.yml @@ -13,7 +13,7 @@ items: items: - name: Type system overview href: ../cppcx/type-system-c-cx.md - - name: Namespaces and type visibility (C++/CX ) + - name: Namespaces and type visibility (C++/CX) href: ../cppcx/namespaces-and-type-visibility-c-cx.md - name: Fundamental types href: ../cppcx/fundamental-types-c-cx.md From 7a381737e5cf326f4bad424e3765f4f472f61682 Mon Sep 17 00:00:00 2001 From: Rageking8 <106309953+Rageking8@users.noreply.github.com> Date: Sat, 2 Aug 2025 22:06:18 +0800 Subject: [PATCH 2/5] Add backticks in "Namespaces and Type Visibility (C++/CX)" topic --- docs/cppcx/namespaces-and-type-visibility-c-cx.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/cppcx/namespaces-and-type-visibility-c-cx.md b/docs/cppcx/namespaces-and-type-visibility-c-cx.md index 2b6464f126..75e446358f 100644 --- a/docs/cppcx/namespaces-and-type-visibility-c-cx.md +++ b/docs/cppcx/namespaces-and-type-visibility-c-cx.md @@ -8,7 +8,7 @@ ms.assetid: cbc01a3a-3b69-4ded-9c42-ecbf0fd0a00e A namespace is a standard C++ construct for grouping types that have related functionality and for preventing name collisions in libraries. The Windows Runtime type system requires that all public Windows Runtime types, including those in your own code, must be declared in a namespace at namespace scope. Public types that are declared at global scope or nested inside another class will cause a compile-time error. -A .winmd file must have the same name that the root namespace has. For example, a class that's named A.B.C.MyClass can be instantiated only if it's defined in a metadata file that's named A.winmd or A.B.winmd or A.B.C.winmd. The name of the executable is not required to match the .winmd file name. +A `.winmd` file must have the same name that the root namespace has. For example, a class that's named `A.B.C.MyClass` can be instantiated only if it's defined in a metadata file that's named `A.winmd` or `A.B.winmd` or `A.B.C.winmd`. The name of the executable is not required to match the `.winmd` file name. ## Type visibility @@ -34,7 +34,7 @@ Use the following access modifiers to control both metadata visibility and sourc ## Windows Runtime namespaces -The Windows API consists of types that are declared in the Windows::\* namespaces. These namespaces are reserved for Windows, and types cannot be added to them. In the **Object Browser**, you can view these namespaces in the windows.winmd file. For documentation about these namespaces, see [Windows API](/uwp/api/). +The Windows API consists of types that are declared in the `Windows::*` namespaces. These namespaces are reserved for Windows, and types cannot be added to them. In the **Object Browser**, you can view these namespaces in the `windows.winmd` file. For documentation about these namespaces, see [Windows API](/uwp/api/). ## C++/CX namespaces @@ -44,7 +44,7 @@ The C++/CX define certain types in these namespaces as part of the projection of |--|--| | default | Contains the built-in numeric and char16 types. These types are in scope in every namespace and a **`using`** statement is never required. | | `Platform` | Contains primarily public types that correspond to Windows Runtime types such as `Array`, `String`, `Guid`, and `Boolean`. Also includes specialized helper types such as `Platform::Agile` and `Platform::Box`. | -| `Platform::Collections` | Contains the concrete collection classes that implement the Windows Runtime collection interfaces `IVector`, `IMap`, and so on. These types are defined in a header file, collection.h, not in platform.winmd. | +| `Platform::Collections` | Contains the concrete collection classes that implement the Windows Runtime collection interfaces `IVector`, `IMap`, and so on. These types are defined in a header file, `collection.h`, not in `platform.winmd`. | | `Platform::Details` | Contains types that are used by the compiler and are not meant for public consumption. | ## See also From 01bbdb8bad8dd994a20000646093a7f663880121 Mon Sep 17 00:00:00 2001 From: Rageking8 <106309953+Rageking8@users.noreply.github.com> Date: Sat, 2 Aug 2025 22:08:38 +0800 Subject: [PATCH 3/5] Clean up redundant relative link in "Namespaces and Type Visibility (C++/CX)" topic --- docs/cppcx/namespaces-and-type-visibility-c-cx.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/cppcx/namespaces-and-type-visibility-c-cx.md b/docs/cppcx/namespaces-and-type-visibility-c-cx.md index 75e446358f..c45561ec68 100644 --- a/docs/cppcx/namespaces-and-type-visibility-c-cx.md +++ b/docs/cppcx/namespaces-and-type-visibility-c-cx.md @@ -49,4 +49,4 @@ The C++/CX define certain types in these namespaces as part of the projection of ## See also -[Type System (C++/CX)](../cppcx/type-system-c-cx.md) +[Type System (C++/CX)](type-system-c-cx.md) From 47ff16f7fac36ea5d5815145d5ea149b8245cc37 Mon Sep 17 00:00:00 2001 From: Rageking8 <106309953+Rageking8@users.noreply.github.com> Date: Sat, 2 Aug 2025 22:12:34 +0800 Subject: [PATCH 4/5] Fix comma in "Namespaces and Type Visibility (C++/CX)" topic --- docs/cppcx/namespaces-and-type-visibility-c-cx.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/cppcx/namespaces-and-type-visibility-c-cx.md b/docs/cppcx/namespaces-and-type-visibility-c-cx.md index c45561ec68..5b6c19d2af 100644 --- a/docs/cppcx/namespaces-and-type-visibility-c-cx.md +++ b/docs/cppcx/namespaces-and-type-visibility-c-cx.md @@ -15,7 +15,7 @@ A `.winmd` file must have the same name that the root namespace has. For example In a namespace, Windows Runtime types—unlike standard C++ types—have either private or public accessibility. By default, the accessibility is private. Only a public type is visible to metadata and is therefore consumable from apps and components that might be written in languages other than C++. In general, the rules for visible types are more restrictive than the rules for non-visible types because visible types cannot expose C++-specific concepts that are not supported in .NET languages or JavaScript. > [!NOTE] -> Metadata is only consumed at run time by .NET languages and JavaScript. When a C++ app or component is talking to another C++ app or component—this includes Windows components ,which are all written in C++—then no run-time consumption of metadata is required. +> Metadata is only consumed at run time by .NET languages and JavaScript. When a C++ app or component is talking to another C++ app or component—this includes Windows components, which are all written in C++—then no run-time consumption of metadata is required. ## Member accessibility and visibility From 0d97ec6c2c6872f19ecef0765f43ca2252680b1e Mon Sep 17 00:00:00 2001 From: Rageking8 <106309953+Rageking8@users.noreply.github.com> Date: Sat, 2 Aug 2025 22:13:04 +0800 Subject: [PATCH 5/5] Update metadata in "Namespaces and Type Visibility (C++/CX)" topic --- docs/cppcx/namespaces-and-type-visibility-c-cx.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/cppcx/namespaces-and-type-visibility-c-cx.md b/docs/cppcx/namespaces-and-type-visibility-c-cx.md index 5b6c19d2af..c225de9e73 100644 --- a/docs/cppcx/namespaces-and-type-visibility-c-cx.md +++ b/docs/cppcx/namespaces-and-type-visibility-c-cx.md @@ -1,8 +1,7 @@ --- -description: "Learn more about: Namespaces and Type Visibility (C++/CX)" title: "Namespaces and Type Visibility (C++/CX)" -ms.date: "12/30/2016" -ms.assetid: cbc01a3a-3b69-4ded-9c42-ecbf0fd0a00e +description: "Learn more about: Namespaces and Type Visibility (C++/CX)" +ms.date: 12/30/2016 --- # Namespaces and Type Visibility (C++/CX)