Visual Studio 2017 STL 可视化工具失败了一个 std::map<MyIntrusivePtr, std::tuple<....> >

visual studio 2017 STL visualizer fails for one std::map<MyIntrusivePtr, std::tuple<....> >

本文关键字:std gt lt MyIntrusivePtr 一个 map tuple 可视化 STL 2017 Studio      更新时间:2023-10-16

所有Visual Studio Watch Windows显示的是:

std::_Tree<std::_TMap_traits<.....

所有其他数据显示正常 - 使用相同或相似的数据。

这是标题:

typedef std::set<expression::ptr> expressionSet;
//pairOfExpression2Usage m_sBool;
typedef boost::flyweights::flyweight<
expressionSet,
boost::flyweights::set_factory<>,
boost::flyweights::refcounted
> expressionSetFW;
typedef std::pair<expressionSetFW, expressionSetFW> pairOfExpressionSetFW;
// these are or-ed together
struct comparePairOfExpressionSetFW
{   bool operator()(
const pairOfExpressionSetFW &_r0,
const pairOfExpressionSetFW&_r1) const;
};
typedef std::set<
pairOfExpressionSetFW,
comparePairOfExpressionSetFW
> setOfPairOfExpressionSet;
struct compareSetOfPairOfExpressionSet
{   bool operator()(
const setOfPairOfExpressionSet &_r0,
const setOfPairOfExpressionSet&_r1) const;
};
typedef boost::flyweights::flyweight<
setOfPairOfExpressionSet,
boost::flyweights::set_factory<compareSetOfPairOfExpressionSet>,
boost::flyweights::refcounted
> setOfPairOfExpressionSetFW;
typedef std::tuple<std::size_t, double, setOfPairOfExpressionSetFW> exprData;
typedef std::map<expression::ptr, exprData> expr2Data;

我已经重新安装了可视化工具。做了

devenv.exe /resetsettings

将 typedefs 放入全局范围。 奇怪的是,所有其他内容(也使用 expression::p tr(作为索引或数据都显示正常。

我为解决这个问题所做的是复制转换进攻

std::map<> 

变成一个

std::map<std::string, std::string>

只是为了能够在调试器中查看它。 这个问题也发生在其他std::map上。我真的很想知道,是什么触发了这种行为。