Boost logo

Boost :

Subject: Re: [boost] [variant] Visual Studio debug visualizers
From: Dmitry Vinogradov (sraider_at_[hidden])
Date: 2009-06-14 05:21:25


Steven Watanabe wrote:
> AMDG
>
> Dmitry Vinogradov wrote:
>> I wrote a simple debug visualizer for boost::variant and I want to
>> share it with community.
>>
>> boost::variant<*,*,*,*,*,*,*,*,*,*,*> {
>> preview (
>> #(
>> #switch($c.which_)
>> #case 0 ( *($T1 *)&($c.storage_.data_) )
>> <snip...>
>> )
>> )
>> children
>> (
>> #(
>> value:
>> #switch($c.which_)
>> #case 0 ( *($T1 *)&($c.storage_.data_) )
>> <snip...>
>> )
>> )
>> }
>
> This is a great start. There are a few more things I'd like to see.
> * if which_ is negative it means that the variant is storing a pointer
> to an object of type T ## -(which_ + 1).

Please tell me how to reproduce it. Does it for recursive_wrapper?

> * make_variant_over allows a variant to be created from a type sequence.
> * make_recursive variant causes the type of the variant itself to be
> substituted
> any instances of the placeholder boost::recursive_variant in the template
> arguments.
>
> The latter two are hard and may be impossible to support, but I would
> definitely like to see support for the first point.

I'll try it.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk