阅读背景:

“在成员函数之外的封闭类的定义中需要默认成员初始值设定项” - 我的代码是不正确的?

来源:互联网 
#include <utility>

struct foo
{
    int x{0};
    foo() noexcept = default;
    void f() noexcept(noexcept(std::declval<foo&>())) {}
};

int main()
{ 
}
#include <utility>

struct foo
{
    int x{0};



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: