Boost logo

Boost :

Subject: Re: [boost] [variant] Visual Studio debug visualizers
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2009-06-13 22:48:36


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).
* 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.

In Christ,
Steven Watanabe


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