Boost logo

Boost :

From: Arkadiy Vertleyb (vertleyb_at_[hidden])
Date: 2002-11-01 20:15:30


"Joel de Guzman" <djowel_at_[hidden]> wrote in message
news:014f01c28207$3d86edb0$0100a8c0_at_kim...
>
> ----- Original Message -----
> From: "Rene Rivera" <grafik666_at_[hidden]>
>
>
> > [2002-11-01] Arkadiy Vertleyb wrote:
> >
> > >Right, but then, how do you call it:
> > >
> > >object.getSomething<type>();
> > >or
> > >object.getSomething((type*)0);
> > >
> > >I wasn't able to use the first syntax, although I was able to do
similar
> > >things with non-member functions.
> >
> > Yep, your are right... I looked at where I use it, and I use the
((type*)0)
> > call also. It just happens that for me that's in another tmplate class,
so I
> > don't see the call directly.
>
> There are other ways to eliminate the macros. I hope you
> guys wouldn't just give up and say it can't be done.

There were many times when I PROVED that something can't be done, and then
actualy did it... Or somebody else did it. :o))

>
> Another comment is the tuple. I think boost tuples can be used.
>

Boost tuples allow the access by the position number. To access by name,
we would have to somehow map the name to the position number. We would
probably have to use strings to define names, which would elliminate the
posibility of compile time checks. Also, static_cast should be
significantly faster than iterating through boost::tuple fields.

I think our approach, which is just a simplified version of Andrey
Alexandrescu's GenScatterredHierarchy, fits rather nicely here...

Arkadiy


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