memoryCorruptionCheck

Mixin that adds a check to ensure that the event type of the event being handled is one of the expected types for the function it is mixed into.

Assumes that it is mixed into a function. (This cannot be statically checked and will return in a compile-time error if false.)

If version MemoryCorruptionChecks is not declared it is a no-op and returns an empty string.

memoryCorruptionCheck
(
Flag!"assertOnError" assertOnError = Yes.assertOnError
)
()

Parameters

assertOnError

Whether to assert(0) if an error is detected. Passed on to the implementation function.

Return Value

Type: auto

A string that can be mixed into a function to add the check.

See Also