Boost logo

Boost Users :

From: David Klein (d.klein_at_[hidden])
Date: 2006-07-26 11:03:44


boost-users-bounces_at_[hidden] wrote:
> Hi boost experts,
>
> Recently, I noticed that I no longer see the actual value of
> a 'boost::optional<__int64>'variable in VS2005 debugger. My program
> is in C++.
>
> I recalled that I could find the actual value from the data field of
> the variable...
>
> Anyone encounted this problem? Other than cast the value to
> be _int64, is there any other way I can work around it?
>
> Thanks in advance,
> Catherine
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users

hi catherine,

+my_int64
        +boost::optional_detail::optional_base ...
                +-
                +-
                +m_storage
                        +dummy_
                                +data
                                +aligner_
                                        +t0
                                        +...
                                        +t23

in case of an int64 it is in t4. but this only seems to work for ints.
you could also add the following line to
%YOUR_MSVS8_DIR%/common7/packages/debugger/autoexp.dat:

<snip>
boost::optional<__int64>= initialized=<m_initialized>
value=<m_storage.dummy_.aligner_.t4>
</snip>

this changes the display of {...} to f.ex. {initialized=true value=42}

--
HTH dave

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net