Subject: Re: [boost] xml?
From: Stefan Seefeld (seefeld_at_[hidden])
Date: 2010-04-09 12:38:40
On 04/09/2010 12:34 PM, Larry Evans wrote:
> On 04/09/10 10:48, Mathias Gaunard wrote:
>> Larry Evans wrote:
>>> What is there about the XPath specification that makes any type
>>> hierarchy for modelling it less suitable than using something
>>> akin to boost.variant?
>>> You see, I'm wondering because using type hierarchies and
>>> virtual functions has been touted as a great advantage of
>>> OO programming; yet, it apparently lacks something which
>>> you need. I'd like to understand what that is.
>> Some could argue that the point of a base class is moot if you have
>> to downcast it to make anything useful with it,
> But boost.variant has to do the equivalent of downcasting based on
> discriminant (the value returned by which()).
No, accessing a member of a union is not really a cast, neither
conceptually nor technically.
-- ...ich hab' noch einen Koffer in Berlin...
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk