Construct an used-defined hash table container type from an AA-literal expression
    ikod 
    geller.garry at gmail.com
       
    Sun Jul  5 21:22:13 UTC 2020
    
    
  
On Sunday, 5 July 2020 at 21:06:32 UTC, Per Nordlöw wrote:
> Is there a way to construct a custom written hash-table 
> container (struct) from an AA-literal expression?
can opAssign help?
struct AA(K,V)
{
     void opAssign(V[K] aa)
     {
     }
}
void main()
{
     AA!(string, int) custom_aa;
     custom_aa = ["one":1, "two":2];
}
    
    
More information about the Digitalmars-d-learn
mailing list