1

我正在使用 Visual Studio 2010 并想更新我的调试器可视化工具以正确显示我的 boost::variant 实例。我找到了这个页面:https ://svn.boost.org/trac/boost/wiki/DebuggerVisualizers和这里https://svn.boost.org/svn/boost/sandbox/boost_docs/subprojects/DebuggerVisualizers/variant.vis。 txt 一个实现来提升支持多达 9 个模板参数的变体。遗憾的是,我们有 12 个参数,而最后 3 个参数没有可视化器表示。我试图添加对最后 3 个参数的支持,但没有任何改变:

boost::variant<boost::detail::variant::recursive_flag<*>,*,*,*,*,*,*,*,*,*,*,*,*>|boost::variant<*,*,*,*,*,*,*,*,*,*,*,*,*> {
preview (
    #(
        #switch($e.which_)
        #case 0 ( *($T1 *)&($e.storage_.data_) )
        #case 1 ( *($T2 *)&($e.storage_.data_) )
        #case 2 ( *($T3 *)&($e.storage_.data_) )
        #case 3 ( *($T4 *)&($e.storage_.data_) )
        #case 4 ( *($T5 *)&($e.storage_.data_) )
        #case 5 ( *($T6 *)&($e.storage_.data_) )
        #case 6 ( *($T7 *)&($e.storage_.data_) )
        #case 7 ( *($T8 *)&($e.storage_.data_) )
        #case 8 ( *($T9 *)&($e.storage_.data_) )
        #case 9 ( *($T10 *)&($e.storage_.data_) )
        #case 10 ( *($T11 *)&($e.storage_.data_) )
        #case 11 ( *($T12 *)&($e.storage_.data_) )
        #case -1 ( **($T1 **)&($e.storage_.data_) )
        #case -2 ( **($T2 **)&($e.storage_.data_) )
        #case -3 ( **($T3 **)&($e.storage_.data_) )
        #case -4 ( **($T4 **)&($e.storage_.data_) )
        #case -5 ( **($T5 **)&($e.storage_.data_) )
        #case -6 ( **($T6 **)&($e.storage_.data_) )
        #case -7 ( **($T7 **)&($e.storage_.data_) )
        #case -8 ( **($T8 **)&($e.storage_.data_) )
        #case -9 ( **($T9 **)&($e.storage_.data_) )
        #case -10 ( **($T10 **)&($e.storage_.data_) )
        #case -11 ( **($T11 **)&($e.storage_.data_) )
        #case -12 ( **($T12 **)&($e.storage_.data_) )
        #default (#([actual members] : [$e,!]))
        #except (#([actual members] : [$e,!]))
    )
)
children
(
    #(
    value :
        #switch($e.which_)
        #case 0 ( *($T1 *)&($e.storage_.data_) )
        #case 1 ( *($T2 *)&($e.storage_.data_) )
        #case 2 ( *($T3 *)&($e.storage_.data_) )
        #case 3 ( *($T4 *)&($e.storage_.data_) )
        #case 4 ( *($T5 *)&($e.storage_.data_) )
        #case 5 ( *($T6 *)&($e.storage_.data_) )
        #case 6 ( *($T7 *)&($e.storage_.data_) )
        #case 7 ( *($T8 *)&($e.storage_.data_) )
        #case 8 ( *($T9 *)&($e.storage_.data_) )
        #case 9 ( *($T10 *)&($e.storage_.data_) )
        #case 10 ( *($T11 *)&($e.storage_.data_) )
        #case 11 ( *($T12 *)&($e.storage_.data_) )
        #case -1 ( **($T1 **)&($e.storage_.data_) )
        #case -2 ( **($T2 **)&($e.storage_.data_) )
        #case -3 ( **($T3 **)&($e.storage_.data_) )
        #case -4 ( **($T4 **)&($e.storage_.data_) )
        #case -5 ( **($T5 **)&($e.storage_.data_) )
        #case -6 ( **($T6 **)&($e.storage_.data_) )
        #case -7 ( **($T7 **)&($e.storage_.data_) )
        #case -8 ( **($T8 **)&($e.storage_.data_) )
        #case -9 ( **($T9 **)&($e.storage_.data_) )
        #case -10 ( **($T10 **)&($e.storage_.data_) )
        #case -11 ( **($T11 **)&($e.storage_.data_) )
        #case -12 ( **($T12 **)&($e.storage_.data_) )
        #default ( *(void*)0 )
        #except ( *(void*)0 ),
        #([actual members] : [$e,!])
    )
)

}

我究竟做错了什么?谢谢

4

0 回答 0