Skip to content

Latest commit

 

History

History
41 lines (33 loc) · 860 Bytes

compiler-warning-c4986.md

File metadata and controls

41 lines (33 loc) · 860 Bytes
description title ms.date f1_keywords helpviewer_keywords ms.assetid
Learn more about: Compiler Warning C4986
Compiler Warning C4986
11/04/2016
C4986
C4986
a3a7b008-29dd-4203-85f3-7740ab6790bb

Compiler Warning C4986

'function': exception specification does not match previous declaration

This warning can be generated when there is an exception specification in one declaration and not the other.

By default, C4986 is off. For more information, see Compiler Warnings That Are Off by Default.

Examples

The following sample generates C4986.

class X { };
void f1() throw (X*);
// ...
void f1()
{
    // ...
}

The following sample eliminates this warning.

class X { };
void f1() throw (X*);
// ...
void f1() throw (X*)
{
    // ...
}