Boost logo

Boost :

From: Joel de Guzman (djowel_at_[hidden])
Date: 2002-12-20 18:40:17

----- Original Message -----
From: "Peter Dimov" <pdimov_at_[hidden]>

> I think you misunderstood; sorry for not being clear.

Heh ;) My mistake. I just woke up and I replied in haste.
Of course you have a point.

> ref(x)(...) can mean two different things, both reasonable. One is to simply
> return x. The other is to return x(...). The convention we have adopted so
> far in bind and function is to treat ref as if ref(x)(...) returns x(...).
> This has nothing to do with spirit using bind, function, or lambda. It's
> about the semantics of ref.
> In fact, if you use ref(b) as above, you now have no way to express the
> other operation, make if_p store a reference to the function object:
> if_p(ref(f))
> [
> ]
> This is necessary when f has state or cannot be copied.

Ok, I understand. Anyway, do you have a suggestion? Perhaps
what I need then is a low-fat var(x) and val(x).


Joel de Guzman

Boost list run by bdawes at, gregod at, cpdaniel at, john at