summaryrefslogtreecommitdiff
path: root/src/command_manager.cc
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2011-09-14 15:36:35 +0000
committerMaxime Coste <frrrwww@gmail.com>2011-09-14 15:36:35 +0000
commit4b38cd3cd0131b2ab276310cc234ab666bd99363 (patch)
treebe269ab870109e1913baf34d59cd59556a86cae7 /src/command_manager.cc
parenteecc5a184e4a3aacaf2984f2171a58440bebc43c (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