template struct Core::ScopedFlag

Sets the flag in the variable when scope is entered and clears it when scope is left.

#include <coreprimitives.h>

template <int kFlag, typename T = int>
struct ScopedFlag
{
    // fields

    T& var;

    // construction

    ScopedFlag(T& var);
};