Boost logo

Boost Users :

From: Douglas Gregor (gregod_at_[hidden])
Date: 2002-07-03 08:12:45


On Wednesday 03 July 2002 12:30 am, Jon Wang wrote:
> Hi,
>
> Recently I've tried to implement Andrei's ScopeGuard (see
> http://www.cuj.com/experts/1812/alexandr.htm?topic=experts for details)
> with boost.function and boost.bind. Is there anything wrong with it? Thanks
> for reviewing.

Looks fine to me. To rein in the compile times a little bit, you can pull in
just the 0-argument version of function, e.g.,
  #include <boost/function/function0.hpp> // (not <boost/function.hpp>)

and use boost::function0<void> instead of boost::function<void>. Under MSVC,
you might even get fewer senseless ICEs :)

        Doug


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