forked from OSchip/llvm-project
aaa58c6679
class is a templatized class that allows you to have a cleanup function called on a data value of type T when the value is set or when the object goes out of scope. It has support for very rudimentary invalid value detection that can be enabled by using the appropriate constructor. Anyone with template experience that can see ways of improving this class please let me know. The example code shows a few typical scenarios in which I would like to use it. It is currently coded with simple type T values in mind (integer file descriptors, pointers, etc), but I am sure some specialization might help out the class for more complex types. There is a lot of documentation including examples in the CleanUp.h header file. llvm-svn: 109239 |
||
---|---|---|
.. | ||
project.pbxproj |