Showing content from https://learn.microsoft.com/en-us/windows/uwp/cpp-and-winrt-apis/naming below:
C++/WinRT naming conventions - UWP applications
C++/WinRT naming conventions
In this article
C++/WinRT has established the following naming conventions:
- The winrt::impl namespace is reserved for C++/WinRT, and you shouldn't use it in your application.
- In the winrt namespace, names that begin with a lowercase letter belong to C++/WinRT, but you may use them in your application. The documentation calls out those names that you can overload or specialize. For example, your application is permitted to specialize the winrt::is_guid_of function template.
- In sub-namespaces of the winrt namespace (except for winrt::impl), names that begin with an uppercase letter are available to your application.
- In all namespaces, names beginning with WINRT_IMPL_ are reserved for C++/WinRT, and you shouldn't use them in your application.
- In all namespaces, names beginning with WINRT_ (except those that begin with WINRT_IMPL_) are reserved for C++/WinRT. You may use them, and the documentation calls out those names that may be defined by your application, such as WINRT_LEAN_AND_MEAN.
It's common for applications to perform namespace composition, and import sub-namespaces of the winrt root namespace into the winrt root namespace:
namespace winrt
{
using namespace winrt::Windows::Foundation;
}
Therefore, your application should adhere to the naming conventions above in sub-namespaces of the winrt namespace.
Here's a summary.
Namespace Name Apps may define Apps may use winrt::impl Any No No winrt and sub-namespaces (except impl) Starts with lowercase letter No Yes winrt and sub-namespaces (except impl) Starts with uppercase letter Yes Yes Any WINRT_IMPL_* No No Any WINRT_* (except WINRT_IMPL_*) Case-by-case Yes
Additional resources
In this article
Was this page helpful?
RetroSearch is an open source project built by @garambo
| Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4