On Tuesday, 30 April 2013 at 17:48:08 UTC, Ivan Kazmenko wrote:
-
import std.functional;
...
RedBlackTree !(MyRecord, binaryFun!a.key b.key, true)
cont;
...
cont = redBlackTree !(a.key b.key, true, MyRecord) ();
-
Error: template instance RedBlackTree!(ValueRecord,
One more question... why associative arrays in D can't be
implemented like here?
http://svn.php.net/viewvc/php/php-src/trunk/Zend/zend_hash.h?view=markup
it seems that php arrays uses hash tables too but they preserve
orders.
From what I see there, this code traverses a hash table in the
On Monday, 29 April 2013 at 16:01:15 UTC, Ivan Kazmenko wrote:
one more question
What is the type of cont?
auto cont = redBlackTree !(a.key b.key, true, MyRecord) ();
I want to use this as a property in a class and i can't use
there auto keyword... I tried different types but it did not
-
import std.functional;
...
RedBlackTree !(MyRecord, binaryFun!a.key b.key, true)
cont;
...
cont = redBlackTree !(a.key b.key, true, MyRecord) ();
-
Error: template instance RedBlackTree!(ValueRecord, binaryFun,
true) RedBlackTree!(ValueRecord, binaryFun, true) does not
On Sunday, 28 April 2013 at 13:18:04 UTC, Ivan Kazmenko wrote:
Hi,
I have a class which I want to use as key in an assoc array
like
this:
string[KeyString] myArray;
What i want is to preserve the order in the array. I want
always
to have 1 before 2 if the string is a numeric value.
Can
one more question
What is the type of cont?
auto cont = redBlackTree !(a.key b.key, true, MyRecord) ();
I want to use this as a property in a class and i can't use
there auto keyword... I tried different types but it did not
work.
For me, the following declaration works:
-
import
hi,
I have a class which I want to use as key in an assoc array like
this:
string[KeyString] myArray;
What i want is to preserve the order in the array. I want always
to have 1 before 2 if the string is a numeric value.
Can anyone help me to understand how const hash_t toHash() should
work?
Hi,
I have a class which I want to use as key in an assoc array like
this:
string[KeyString] myArray;
What i want is to preserve the order in the array. I want always
to have 1 before 2 if the string is a numeric value.
Can anyone help me to understand how const hash_t toHash()
should