相关疑难解决方法(0)

在VS 2013中使用初始化列表初始化地图的地图

我正在尝试使用C++ 11初始化地图地图.我的编译器是VS 2013 Express.

unordered_map<EnumType, unordered_map<string, string>> substitutions = {
    {
        Record::BasementType,
        {
            { "0", "" },
            { "1", "Slab or pier" },
            { "2", "Crawl" }
        }
    },
    {
        Record::BuildingStyle,
        {
            { "0", "" },
            { "1", "Ranch" },
            { "2", "Raised ranch" }
        }
    },
    // ... and so on
};
Run Code Online (Sandbox Code Playgroud)

它是编译但我在ntdll.dll中获得断点.但是这段代码的简化版本:

unordered_map<EnumType, unordered_map<string, string>> substitutions = {
    {
        Record::BasementType,
        {
            { "0", "" },
            { "1", "Slab or pier" },
            { "2", "Crawl" }
        }
    },
    // …
Run Code Online (Sandbox Code Playgroud)

c++ stl c++11 visual-studio-2013

10
推荐指数
1
解决办法
2458
查看次数

标签 统计

c++ ×1

c++11 ×1

stl ×1

visual-studio-2013 ×1