Boost logo

Boost :

From: Braden Ganetsky (braden.ganetsky_at_[hidden])
Date: 2024-07-16 04:24:14


I have some more updates to the Natvis implementation in Boost.Unordered.
Now we can visualize any container with an allocator that uses fancy
pointers, as long as the fancy pointer has the proper customization points
defined. The Natvis file itself has instructions on how to add support for
your own fancy pointer type, if you so choose. (
https://github.com/boostorg/unordered/blob/develop/extra/boost_unordered.natvis
)

I have another article, this time about the Natvis implementation for the
open-addressing containers, and the challenges of adding fancy
pointer support. I outline how to define the customization points for the
user-injected behaviour of the fancy pointer types. (Plus there's a bonus
section where I wrote the fast inverse square root function in a Natvis
intrinsic.) Just like last time, these are a lot of things I wish I knew
earlier. Hopefully this article can help someone else learn.

Link to the article: https://blog.ganets.ky/NatvisForUnordered2/

Thanks

On Mon, 3 Jun 2024 at 12:25, Braden Ganetsky <braden.ganetsky_at_[hidden]>
wrote:

> Hi everyone,
>
> This is my first message on the ML. I've written visualizations in the
> Visual Studio Natvis framework for the Boost.Unordered containers and
> iterators. This will improve the user experience for anyone using Visual
> Studio. The visualizations mirror those of the STL unordered containers as
> closely as possible, except that end iterators display as "{ end iterator
> }" instead of the visualization just breaking.
>
> Here is the file:
> https://github.com/boostorg/unordered/blob/develop/extra/boost_unordered.natvis
>
> I've written an accompanying article about the natvis implementation for
> the closed-addressing containers. I will be writing a second article about
> the implementation for the open-addressing containers. This first article
> contains some tips and tricks for using the natvis framework that I wish I
> knew before going into this, especially about using "<Intrinsic>" elements.
> Hopefully it can help someone else.
>
> Link to the article: https://blog.ganets.ky/NatvisForUnordered/
>
> Custom gdb pretty-printers will be next up.
>
> Thank you to Joaquín for reviewing the code and the article.
>
> Thanks all,
> Braden Ganetsky
>


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