From: David Abrahams (dave_at_[hidden])
Date: 2004-02-12 12:45:20
Noel Yap <Noel.Yap_at_[hidden]> writes:
> I'd like to have a variable act as a function call. For example:
> Foo& getFoo();
> foo; // really calls getFoo
> Is there a boost way to do this?
There's not even a C++ way to do it.
If you have the luxury of assigning foo to another variable or
passing it to a function, you can use implicit conversion operators
to force a function call at that point.
-- Dave Abrahams Boost Consulting www.boost-consulting.com