diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2011-09-14 15:36:35 +0000 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2011-09-14 15:36:35 +0000 |
| commit | 4b38cd3cd0131b2ab276310cc234ab666bd99363 (patch) | |
| tree | be269ab870109e1913baf34d59cd59556a86cae7 /src/command_manager.cc | |
| parent | eecc5a184e4a3aacaf2984f2171a58440bebc43c (diff) | |
utils: add auto_raii helper function
this helper permits to register a resource and cleanup function to keep
exception safety with C like resource. For exemple, to be sure that a
FILE* will be closed, you can use:
auto file = auto_raii(fopen("filename"), fclose);
file will auto cast to FILE* when needed, and will call fclose when
going out of scope.
Diffstat (limited to 'src/command_manager.cc')
0 files changed, 0 insertions, 0 deletions
