Edward Diener
Pierre THIERRY wrote:
Le Sat, 17 Jun 2006 18:53:19 -0400, David Abrahams a écrit :
Usually, in the debugger, you cast the base address of the actual
storage to a pointer to the type stored, and go from there.
Thanks a lot, it did the trick! In fact, I immediately ran into problems
about namespaces, but I managed to find in recent gdb newsgroups
postings how to do...
So now I can debug my varaints! Maybe that could be valuable if such an
information was in the Boost documentation?
What Dave suggested is standard information for anyone using a debugger
in C++. Putting that in the Boost documentation is unnecessary.
I disagree. Certainly Pierre's experience belies that statement. More generally, variant presents a high-level abstraction, and users aren't necessarily expected to have any idea how it works internally. For the most part, a naive user with a good debugger can explore his program's data structures at will, but unlike almost any other library component, variant is a barrier to the type information the debugger needs. -- Dave Abrahams Boost Consulting www.boost-consulting.com