Skip to content

Latest commit

 

History

History
33 lines (24 loc) · 1.04 KB

compiler-warning-c4687.md

File metadata and controls

33 lines (24 loc) · 1.04 KB
description title ms.date f1_keywords helpviewer_keywords ms.assetid
Learn more about: Compiler Warning C4687
Compiler Warning C4687
11/04/2016
C4687
C4687
2f28e0b1-7358-4c88-bd70-aad8f0aa004c

Compiler Warning C4687

'class': a sealed abstract class cannot implement an interface 'interface'

Remarks

A sealed, abstract type is typically only useful to hold static member functions.

For more information, see abstract and sealed.

C4687 is issued as an error by default. You can suppress C4687 with the warning pragma. If you are certain that you want to implement an interface in a sealed, abstract type, you can suppress C4687.

Example

The following sample generates C4687.

// C4687.cpp
// compile with: /clr /c
interface class A {};

ref struct B sealed abstract : A {};   // C4687
ref struct C sealed : A {};   // OK
ref struct D abstract : A {};   // OK