Boost logo

Boost :

From: Noel Yap (Noel.Yap_at_[hidden])
Date: 2004-02-17 07:31:45


"Victor A. Wagner, Jr." wrote:
>
> At Thursday 2004-02-12 07:43, you wrote:
> >I'd like to have a variable act as a function call. For example:
> >
> > Foo& getFoo();
> >
> > foo; // really calls getFoo
>
> you're saying there is a function which reruns a reference to a foo and you
> want it called when you just say
> foo;
> you're throwing away the return?

Not at all. I would like something that acts exactly like:

# define foo getFoo()

except that it must be codable from within another macro definition. It's not throwing away the return since:

        foo.bar();

should act exactly like:

        getFoo().bar();

Noel


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