深入学习C++关键字:noexcept

90 阅读1分钟
关键字:
    noexcept  //表明该函数不会出现异常,让编译器进行性能的优化
    
示例1void f() noexcept {}

示例2void f() noexcept(false) {} //跟不写是一个效果