Boost logo

Boost Users :

Subject: Re: [Boost-users] Boost.Function and Boost.Bind
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2008-11-20 11:28:35


Yang Zhang wrote:
>> bind(twice, protect(bind(show, 0)))
> Thanks, this works. Would anybody be able to explain what just
> happened? According to:

bind(twice, bind(show, 0))()

is evaluated as


You want:

twice(bind(show, 0))

The protect prevents show from being evaluated
immediately by Boost.Bind.

In Christ,
Steven Watanabe

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at