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
原文链接: https://www.cnblogs.com/yeahle/p/12216504.html
欢迎关注
微信关注下方公众号,第一时间获取干货硬货;公众号内回复【pdf】免费获取数百本计算机经典书籍
原创文章受到原创版权保护。转载请注明出处:https://www.ccppcoding.com/archives/192129
非原创文章文中已经注明原地址,如有侵权,联系删除
关注公众号【高性能架构探索】,第一时间获取最新文章
转载文章受原作者版权保护。转载请注明原作者出处!