我有意从我使用 VSCode 编写的 C++ 应用程序生成核心转储。我不知道如何调试核心转储。有没有人有这方面的经验,他们愿意分享?
***** 更新 ***** 我相信我现在可以工作了。我为核心文件创建了第二个调试配置。我需要添加指向生成的转储文件的“coreDumpPath”选项。我还需要删除 preLaunchTask 选项,它总是会构建一个新的可执行文件。
有没有办法创建一个预定义的类型列表,并在c ++ 17中的std :: variant中使用这些类型?这是我正在尝试做的,它编译,但不能像我希望的那样工作:
template < class ... Types > struct type_list {};
using valid_types = type_list< int16_t, int32_t, int64_t, double, std::string >;
using value_t = std::variant< valid_types >;
Run Code Online (Sandbox Code Playgroud)