c++ - 如何在 QtCreator 的调试器中显示 std::multimap 和 std::multiset 的内容?

标签 c++ qt debugging gdb qt-creator

我正在尝试检查 std::multimapstd::multiset 的内容QtCreator

我显示的不是值列表,而是实现细节。

奇怪的是 std::mapstd::set 对应项显示正常:

#include <iostream>
#include <map>
#include <set>
#include <string>

int main()
{
    std::multimap<int, std::string> multimap;
    multimap.insert(std::make_pair(1, "one"));
    multimap.insert(std::make_pair(2, "two"));
    multimap.insert(std::make_pair(3, "three"));

    std::multiset<int> multiset = {1,2,3};

    std::map<int, std::string> map;
    map.insert(std::make_pair(1, "one"));
    map.insert(std::make_pair(2, "two"));
    map.insert(std::make_pair(3, "three"));

    std::set<int> set = {1,2,3};

    return 0;
}

enter image description here

我正在使用:

Qt Creator 3.0.0 
gcc 4.8
GDB 7.6.1
Qt 5.2.0
Ubuntu 13.10

是否支持此功能?

最佳答案

关于c++ - 如何在 QtCreator 的调试器中显示 std::multimap 和 std::multiset 的内容?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21020154/

相关文章:

c++ - 函数调用前的类型声明是什么意思

c++ - 使用 Qt 在 Symbian 中处理多个窗口

c++ - 为什么设计器生成的嵌入为 "Aggregation"的 UI 类无法实现自定义插槽?

java - 在这种情况下,它的任何父类(super class)都不为人所知

java - 递归回文法调试

C++ 错误 : was not declared in this scope with private after public

c++ - 函数的模板返回类型编译错误

c++ - 检查是否至少有一个 Wayland session 正在运行

c++ - 了解qmake工程文件中的Term\\\"$$PWD/\\\"

vba - VBA Debug.Print 记录到哪里?