Skip to content

Commit c8bc604

Browse files
Merge pull request #5563 from Rastaban/docs-editor/c5243-1714090159
Update c5243.md
2 parents 516b023 + 7452aa7 commit c8bc604

File tree

1 file changed

+2
-2
lines changed
  • docs/error-messages/compiler-warnings

1 file changed

+2
-2
lines changed

docs/error-messages/compiler-warnings/c5243.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: "Compiler Warning C5243"
2+
title: Compiler warning C5243
33
description: Compiler warning C5243 description and solution.
44
ms.date: 08/09/2021
55
f1_keywords: ["C5243"]
@@ -11,7 +11,7 @@ helpviewer_keywords: ["C5243"]
1111
1212
## Remarks
1313

14-
The Microsoft C++ ABI in Visual Studio 2019 and earlier versions uses more than one kind of pointer-to-member type. These types have different sizes that depend on the inheritance model used by the class. The C++ standard allows you to declare a pointer-to-member of an incomplete class type. If you declare a variable of pointer-to-member type for an incomplete class, the compiler must use the most general representation. It can lead to a *one definition rule*, or ODR violation, since the compiler may use a smaller, more specific representation for this pointer-to-member type in other translation units where the complete class type is available.
14+
The Microsoft C++ ABI uses more than one kind of pointer-to-member type. These types have different sizes that depend on the inheritance model used by the class. The C++ standard allows you to declare a pointer-to-member of an incomplete class type. If you declare a variable of pointer-to-member type for an incomplete class, the compiler must use the most general representation. It can lead to a *one definition rule*, or ODR violation, since the compiler may use a smaller, more specific representation for this pointer-to-member type in other translation units where the complete class type is available.
1515

1616
To resolve this error, you can specify the complete class type before you declare the pointer-to-member variable. Or, use a Microsoft-specific [inheritance keyword](../../cpp/inheritance-keywords.md) to specify the correct inheritance model on the incomplete forward class declaration.
1717

0 commit comments

Comments
 (0)