A base class for data structure classes wishing to make iterators ("handles") pointing into themselves fail-fast.
More...
#include <wpi/EpochTracker.h>
|
class | HandleBase |
| A base class for iterator classes ("handles") that wish to poll for iterator invalidating modifications in the underlying data structure. More...
|
|
|
| DebugEpochBase ()=default |
|
void | incrementEpoch () |
| Calling incrementEpoch invalidates all handles pointing into the calling instance.
|
|
| ~DebugEpochBase () |
| The destructor calls incrementEpoch to make use-after-free bugs more likely to crash deterministically.
|
|
A base class for data structure classes wishing to make iterators ("handles") pointing into themselves fail-fast.
When building without asserts, this class is empty and does nothing.
DebugEpochBase does not by itself track handles pointing into itself. The expectation is that routines touching the handles will poll on isHandleInSync at appropriate points to assert that the handle they're using is still valid.
◆ DebugEpochBase()
wpi::DebugEpochBase::DebugEpochBase |
( |
| ) |
|
|
default |
◆ ~DebugEpochBase()
wpi::DebugEpochBase::~DebugEpochBase |
( |
| ) |
|
|
inline |
The destructor calls incrementEpoch to make use-after-free bugs more likely to crash deterministically.
◆ incrementEpoch()
void wpi::DebugEpochBase::incrementEpoch |
( |
| ) |
|
|
inline |
Calling incrementEpoch invalidates all handles pointing into the calling instance.
The documentation for this class was generated from the following file: