RefGetter

Generates a getter for a field that returns a reference to it.

template RefGetter (
alias field
AccessModifier access = AccessModifier.Public
string name = field.stringof[1 .. $]
) {
enum RefGetter;
}

Parameters

field

The field to generate the property for.

access

The access modifier for the getter function.

name

The name of the property functions. Defaults to the field name minus the first character. Meant for fields that start with underscores.

Meta