|
|
|
|
|
by gavinray
1345 days ago
|
|
D-lang attributes can be used like a label, so for example you can put at the top of your file: @safe nogc:
auto myFunc() { // do stuff }
struct Blah {}
Whatever attributes you use apply to all code in the lexical scope below the colon.It's useful for structs/classes struct MyThing {
auto unsafeFunc() {}
@safe:
auto safeFunc1() {}
}
|
|