|
Boost Users : |
Subject: Re: [Boost-users] Boost.Function and Boost.Bind
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2008-11-20 11:28:35
AMDG
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
twice(show(0))
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 hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net