
"Joaquín Mª López Muñoz" <joaquin@tid.es> wrote in message news:40ECEB73.6F7C82E0@tid.es...
Jonathan Turkanis ha escrito:
Have you considered submitting it for fast track review?
Why not, if people are interested (note, however, that past attempts at submitting a scope guard library have failed.) At least the following would have to be addressed in order to improve the implementation for submission as a public library:
* Provide (an equivalent of) ON_BLOCK_EXIT.
Pavel reminded me about the problem with the __LINE__ macro on VC6 using (/ZI), and I'm not optimistic about finding a workaround. However, I don't regard lack of full VC6 support to be a show-stopper.
* The implementation should rely on Boost.PP so that a larger (and configurable) number of parameters can be handled.
I think this stuff can be delegated to Bind or Lambda. I'm going to post a message about this.
* At the point of destruction of a sope guard, currently it is assumed that the user provided function does not throw. This is a debated issue, maybe what to do about exceptions here can be handled by a policy.
I suggest two object generators: make_guard and safe_guard, the latter catching all exceptions. Jonathan