diff --git a/include/ircd/util/scope_count.h b/include/ircd/util/scope_count.h index 643e81a4a..da38f70eb 100644 --- a/include/ircd/util/scope_count.h +++ b/include/ircd/util/scope_count.h @@ -15,11 +15,12 @@ namespace ircd { inline namespace util { template struct scope_count; -}}; +}} -/// A simple boiler-plate for incrementing a counter when constructed and -/// decrementing it to its previous value when destructed. This takes a runtime -/// reference to that counter. +/// Increment a counter when constructed and decrement it when destructed. +/// This takes a runtime reference to that counter. The counter thus maintains +/// the number of reentrances (or entrances across different contexts). +/// template struct ircd::util::scope_count { diff --git a/include/ircd/util/scope_restore.h b/include/ircd/util/scope_restore.h index 0213bef57..88df882ff 100644 --- a/include/ircd/util/scope_restore.h +++ b/include/ircd/util/scope_restore.h @@ -17,6 +17,9 @@ inline namespace util template struct scope_restore; }} +/// Overwrite a value for the duration of the instance restoring the +/// original value at destruction. Device cannot be moved or copied. +/// template struct ircd::util::scope_restore {