From 7121465c0ae14f8f1f8334791c69104ac5e62f96 Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Wed, 12 Feb 2014 17:04:48 +1100 Subject: [PATCH] Add sectioning comments --- raii.hpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/raii.hpp b/raii.hpp index e3df797b..9062fa3e 100644 --- a/raii.hpp +++ b/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 struct scoped_counter { scoped_counter (T &_counter): @@ -38,6 +40,7 @@ namespace util { }; + /// Executes a function upon object destruction template struct scoped_function { scoped_function (T &&_func):