Add sectioning comments
This commit is contained in:
parent
b1e5c5c309
commit
7121465c0a
3
raii.hpp
3
raii.hpp
@ -22,9 +22,11 @@
|
||||
|
||||
#include "preprocessor.hpp"
|
||||
|
||||
/// Defines a translation-unit-unique variable useful for unnamed scoped variables
|
||||
#define raii PASTE(__unique_, __COUNTER__)
|
||||
|
||||
namespace util {
|
||||
/// Increments a counter for the lifetime of the object
|
||||
template <typename T>
|
||||
struct scoped_counter {
|
||||
scoped_counter (T &_counter):
|
||||
@ -38,6 +40,7 @@ namespace util {
|
||||
};
|
||||
|
||||
|
||||
/// Executes a function upon object destruction
|
||||
template <typename T>
|
||||
struct scoped_function {
|
||||
scoped_function (T &&_func):
|
||||
|
Loading…
Reference in New Issue
Block a user