Skip to content

Latest commit

 

History

History
51 lines (48 loc) · 1001 Bytes

compiler-error-c2523.md

File metadata and controls

51 lines (48 loc) · 1001 Bytes
title Compiler Error C2523 | Microsoft Docs
ms.custom
ms.date 11/04/2016
ms.reviewer
ms.suite
ms.technology
cpp-tools
ms.tgt_pltfrm
ms.topic error-reference
f1_keywords
C2523
dev_langs
C++
helpviewer_keywords
C2523
ms.assetid 7951b700-8f37-45a0-beb4-a79ae0ced72e
caps.latest.revision 9
author corob-msft
ms.author corob
manager ghogen
translation.priority.ht
cs-cz
de-de
es-es
fr-fr
it-it
ja-jp
ko-kr
pl-pl
pt-br
ru-ru
tr-tr
zh-cn
zh-tw

Compiler Error C2523

'class::~identifier' : destructor/finalizer tag mismatch

The name of the destructor must be the class name preceded by a tilde (~). The constructor and destructor are the only members that have the same name as the class.

The following sample generates C2523:

// C2523.cpp  
// compile with: /c  
class A {  
   ~B();    // C2523  
   ~A();   // OK  
};