为什么下面c++11程序崩溃visual studio 2013 express edition

Why following c++11 program crash visual studio 2013 expresss edition?

本文关键字:studio 2013 express edition visual 崩溃 c++11 程序 为什么      更新时间:2023-10-16

下面是导致VS2013 express版崩溃的程序。同样的程序在gcc4.8上编译并成功运行。在我看来,这是VS的bug。

#include<iostream>
#include<string>
struct x
{
public:
    std::string s{};
    //Does not crash if we replace above line with below one
    //std::string s{"VS2013"};
    int i{10};
public:
    x()  = default;
    ~x() = default;
    x(const x& rhs) = default;
    x& operator=(const x& rhs) = default;
};

int main()
{
    x a;
    std::cout << a.s << std::endl;
    std::cout << a.i << std::endl;
    return 0;
}

我想知道我的假设是正确的还是我遗漏了什么

安装vs2013的最新服务包。它会消失的