What to do when you want to add attributes to your class functions?

Kagamin spam at here.lot
Fri Sep 16 17:13:09 UTC 2022


To reduce template bloat declare implementation nontemplated:
```
void notify()
{
	shared me=cast(shared)this;
	me.notifyImpl();
}
void notify() shared
{
	notifyImpl();
}
void notify2() shared @nogc
{
	notifyImpl();
}
private void notifyImpl() shared @nogc
{
	code...
}
```


More information about the Digitalmars-d mailing list