assertSaneStorageClasses

Asserts that a parameter storage class is not ref if inFiber, and neither ref nor out if not inFiber. To be run during CTFE.

Take the storage class as a template parameter and statically assert inside this function, unlike how udaSanityCheck returns false on failure, so we can format and print the error message once here (instead of at all call sites upon receiving false).

version(unittest)
assertSaneStorageClasses
(
const ParameterStorageClass storageClass
,
const bool paramIsConst
,
const bool inFiber
,
const string module_
,
const string typestring
)

Parameters

storageClass ParameterStorageClass

The storage class of the parameter.

paramIsConst bool

Whether or not the parameter is const.

inFiber bool

Whether or not the event handler is annotated .fiber(true).

module_ string

The module name of the plugin.

typestring string

The signature string of the function.

Return Value

Type: auto

true if the storage class is valid; asserts 0 if not.