This project has moved and is read-only. For the latest updates, please go here.


support for boost::optional<T&>


I frequently use boost::optional, but have found that the visualizer provided here does not support boost::optional<T&>. I came up with an alternative visualizer for boost::optional that supports value and reference types.
  <Type Name="boost::detail::reference_content&lt;*&gt;">

  <Type Name="boost::optional_detail::aligned_storage&lt;*&gt;">
    <DisplayString>{*(($T1 *)}</DisplayString>
      <ExpandedItem>*(($T1 *)</ExpandedItem>
  <Type Name="boost::optional&lt;*&gt;">
    <AlternativeType Name="boost::optional_detail::optional_base&lt;*&gt;" />
    <DisplayString Condition="!m_initialized">empty</DisplayString>
    <DisplayString Condition="m_initialized">{m_storage}</DisplayString>
      <ExpandedItem Condition="m_initialized">m_storage</ExpandedItem>
Additionally, this visualizer makes it quicker to access details about the object inside the boost::optional by using ExpandedItem instead of Item.

It would be great to see this addition added to the extension.
Closed Jul 12, 2015 at 1:20 AM by KindDragon
Fixed in version 1.0.18 (version for VS2013 will be released soon)


KindDragon wrote Nov 18, 2014 at 11:09 PM

Thank you. I will add it in next version

mattlindner wrote Nov 18, 2014 at 11:51 PM

Great! Thank you!