declaration of 'void* operator new [](size_t)' has a different exception specifier

Posted fengtai

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了declaration of 'void* operator new [](size_t)' has a different exception specifier相关的知识,希望对你有一定的参考价值。

Are you using C++11 or later?

The original operator new() declarations in C++98

throwing:   
void* operator new (std::size_t size) throw (std::bad_alloc);

nothrow:
void* operator new (std::size_t size, const std::nothrow_t& nothrow_value) throw();

placement:
void* operator new (std::size_t size, void* ptr) throw();

Have been changed in C++11 to use noexcept keyword:

throwing:   
void* operator new (std::size_t size);

nothrow:    
void* operator new (std::size_t size, const std::nothrow_t& nothrow_value) noexcept;

placement:  
void* operator new (std::size_t size, void* ptr) noexcept;

from 

Different exception specifier with g++ 6.2

以上是关于declaration of 'void* operator new [](size_t)' has a different exception specifier的主要内容,如果未能解决你的问题,请参考以下文章

Local declaration of 'XXX' hides instance variable

在QT编程中 出现iso c++ forbids declaration of 'bitset' with no type

warning: implicit declaration of function 'func1' [-Wimplicit-function-declaration]

KissXML/DDXMLDocument: Declaration of 'xmlKeepBlanksDefault' must be imported

解决编译错误 implicit declaration of function 'strptime'

QT学习之forward declaration of 'struct Ui::xxx';invalid use of incomplete struct "Ui::Widg