|
Archives
D Programming
DD.gnu digitalmars.D digitalmars.D.bugs digitalmars.D.dtl digitalmars.D.dwt digitalmars.D.announce digitalmars.D.learn digitalmars.D.debugger C/C++ Programming
c++c++.announce c++.atl c++.beta c++.chat c++.command-line c++.dos c++.dos.16-bits c++.dos.32-bits c++.idde c++.mfc c++.rtl c++.stl c++.stl.hp c++.stl.port c++.stl.sgi c++.stlsoft c++.windows c++.windows.16-bits c++.windows.32-bits c++.wxwindows digitalmars.empire digitalmars.DMDScript electronics |
digitalmars.D.dtl - template matching for associative arrays
Hi,
for arrays there is this way to match arrays in template arguments:
class SomeClass(T : T[])
{
}
But how can you achieve this for AA?
class SomeClass(K[V])
{
}
.. doesn't work. But this does:
class SomeClass(K, V, M : K[V])
{
}
.. but this way you have to know the key and value type in advance
which doesn't help to make the code "better".
Is there a library function to accomplish this or at least a map type
decomposition to key/value types?
Thanks in advance.
Mar 30 2007
PNoel wrote: Apr 01 2007
|