Boost logo

Boost Users :

From: Nat Goodspeed (ngoodspeed_at_[hidden])
Date: 2004-06-23 11:17:27


> -----Original Message-----
> From: Erik Thiele [mailto:erik_at_[hidden]]
> Sent: Wednesday, June 23, 2004 11:28 AM
> To: boost-users_at_[hidden]
> Subject: [Boost-users] protassign
>
> now i can do:
>
> void foo()
> {
> protassign<bool> foorunning_assigner(foorunning, true);
> dojobs();
> dofoooo();
> }
>
> and that's all. is there one such thing in boost already???

[Nat] In the forthcoming Boost serialization library:

http://www.rrsd.com/boost/

there's a state_saver template class that does what you're talking
about:

http://www.rrsd.com/boost/libs/serialization/doc/state_saver.html

This seems useful enough to promote to a library more general than the
serialization library.


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