struct static initializer method apply to UDA
learnfirst1
learnfirst1 at gmail.com
Thu Dec 6 11:04:23 UTC 2018
my question is how to easy use struct static initializer
method with UDA.
Fake code:
struct DbColumn {
string name;
bool unique ;
bool signed ;
bool nullable ;
}
struct Order {
uint id;
@DbColumn({ .nullable= true}) // not working
string order_id;
@DbColumn({ :nullable= true}) // not working
string order_time;
@DbColumn(nullable= true) // not working
string order_time;
}
More information about the Digitalmars-d-learn
mailing list