Nóta
Teastaíonn údarú chun rochtain a fháil ar an leathanach seo. Is féidir leat triail a bhaint as shíniú isteach nó eolairí a athrú.
Teastaíonn údarú chun rochtain a fháil ar an leathanach seo. Is féidir leat triail a bhaint as eolairí a athrú.
'function' : redefinition; different exception specifications
Remarks
This error indicates that a function overload was attempted only on the exception specification.
By default, the compiler considers a noexcept specification to be equivalent to a throw() or throw(some_type) specification. Under /Za, this check is more strict.
To resolve this issue, change all declarations and definitions of the function (or the specific function overload) to use the same exception specification.
Example
The following example generates C2382:
// C2382.cpp
// compile with: /Za /c
void f1(void) noexcept {}
void f1(void) {} // C2382
void f2(void) throw() {} // OK