bigfloat

bearophile bearophileHUGS at lycos.com
Sun Apr 12 15:28:10 PDT 2009


Benji Smith:
>     // Defaults to using built-in associative array type
>     auto assocArray = [
>        "hello" : "world
>     ];
> 
>     // Uses my own custom type.
>     auto hashtable = MyHashTableType!(string, string) [
>        "hello" : "world
>     ];

In the second case the type inference of the compiler may find the types from the AA literal itself:

auto hashtable = MyHashTableType ["hello" : "world];

Bye,
bearophile



More information about the Digitalmars-d mailing list