struct static initializer method apply to UDA
    Basile B. 
    b2.temp at gmx.com
       
    Thu Dec  6 11:09:47 UTC 2018
    
    
  
On Thursday, 6 December 2018 at 11:04:23 UTC, learnfirst1 wrote:
> 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;
> }
Looks like what you want is named parameters.
    
    
More information about the Digitalmars-d-learn
mailing list