// Helper classes for reference counting to enforce construction/destruction order and // usage of the top element of a stack in debug mode with no overhead in release mode.
// Reference counter. No references allowed in destructor or in explicitly called CheckNoRefs(). template <bool kIsDebug> class DebugStackRefCounterImpl; // Reference. Allows an explicit check that it's the top reference. template <bool kIsDebug> class DebugStackReferenceImpl; // Indirect top reference. Checks that the reference is the top reference when used. template <bool kIsDebug> class DebugStackIndirectTopRefImpl;
using DebugStackRefCounter = DebugStackRefCounterImpl<kIsDebugBuild>; using DebugStackReference = DebugStackReferenceImpl<kIsDebugBuild>; using DebugStackIndirectTopRef = DebugStackIndirectTopRefImpl<kIsDebugBuild>;
// Non-debug mode specializations. This should be optimized away.
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.