From 25817acbfc2cbef97383b51075177ffe1e3b4b94 Mon Sep 17 00:00:00 2001 From: Alex Guteniev Date: Tue, 11 Jul 2023 23:11:18 +0300 Subject: [PATCH 1/2] Mark `raw_name` Microsoft Specific --- docs/cpp/type-info-class.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/cpp/type-info-class.md b/docs/cpp/type-info-class.md index 51a91196c12..905fb83cb83 100644 --- a/docs/cpp/type-info-class.md +++ b/docs/cpp/type-info-class.md @@ -1,7 +1,7 @@ --- description: "Learn more about: type_info Class" title: "type_info Class" -ms.date: "11/04/2016" +ms.date: "07/11/2023" f1_keywords: ["type_info"] helpviewer_keywords: ["class type_info", "type_info class"] ms.assetid: 894ddda2-7de4-4da3-9404-d2c74e356c16 @@ -38,8 +38,12 @@ There is no link between the collating order of types and inheritance relationsh The `type_info::name` member function returns a `const char*` to a null-terminated string representing the human-readable name of the type. The memory pointed to is cached and should never be directly deallocated. +**Microsoft Specific** + The `type_info::raw_name` member function returns a `const char*` to a null-terminated string representing the decorated name of the object type. The name is actually stored in its decorated form to save space. Consequently, this function is faster than `type_info::name` because it doesn't need to undecorate the name. The string returned by the `type_info::raw_name` function is useful in comparison operations but is not readable. If you need a human-readable string, use the `type_info::name` function instead. +**END Microsoft Specific** + Type information is generated for polymorphic classes only if the [/GR (Enable Run-Time Type Information)](../build/reference/gr-enable-run-time-type-information.md) compiler option is specified. ## See also From db437539f2d06e8f6a065e431908ccf9124f8219 Mon Sep 17 00:00:00 2001 From: Tyler Whitney Date: Tue, 11 Jul 2023 15:18:50 -0700 Subject: [PATCH 2/2] Update type-info-class.md --- docs/cpp/type-info-class.md | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/docs/cpp/type-info-class.md b/docs/cpp/type-info-class.md index 905fb83cb83..65843208264 100644 --- a/docs/cpp/type-info-class.md +++ b/docs/cpp/type-info-class.md @@ -4,7 +4,6 @@ title: "type_info Class" ms.date: "07/11/2023" f1_keywords: ["type_info"] helpviewer_keywords: ["class type_info", "type_info class"] -ms.assetid: 894ddda2-7de4-4da3-9404-d2c74e356c16 --- # type_info Class @@ -38,11 +37,7 @@ There is no link between the collating order of types and inheritance relationsh The `type_info::name` member function returns a `const char*` to a null-terminated string representing the human-readable name of the type. The memory pointed to is cached and should never be directly deallocated. -**Microsoft Specific** - -The `type_info::raw_name` member function returns a `const char*` to a null-terminated string representing the decorated name of the object type. The name is actually stored in its decorated form to save space. Consequently, this function is faster than `type_info::name` because it doesn't need to undecorate the name. The string returned by the `type_info::raw_name` function is useful in comparison operations but is not readable. If you need a human-readable string, use the `type_info::name` function instead. - -**END Microsoft Specific** +The `type_info::raw_name` member function is Microsoft specific. It returns a `const char*` to a null-terminated string representing the decorated name of the object type. The name is stored in its decorated form to save space. Consequently, this function is faster than `type_info::name` because it doesn't need to undecorate the name. The string returned by the `type_info::raw_name` function is useful in comparison operations but is not readable. If you need a human-readable string, use `type_info::name` instead. Type information is generated for polymorphic classes only if the [/GR (Enable Run-Time Type Information)](../build/reference/gr-enable-run-time-type-information.md) compiler option is specified.