Get AA key and value type

Pierre via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun Sep 20 00:47:08 PDT 2015


On Saturday, 19 September 2015 at 18:13:09 UTC, Marc Schütz wrote:
> On Saturday, 19 September 2015 at 12:50:51 UTC, Pierre wrote:
>> Hi everybody,
>>
>> I would like to extract key and value type from AA.
>>
>
> You can also do it with built-in syntax:
>
> template AATypes(AA : K[V], K, V)
> {
>     alias Key = K;
>     alias Value = V;
> }

I see, maybe .KeyType and .ValueType should be integrated in AA.
Or like C++ with map, make a ValueType(::value_type) field wich 
contain a pair of type.


More information about the Digitalmars-d-learn mailing list