Thanks! The alias solution works and is good enough for me. Also
thanks for providing the code to typecheck the alias, I would
have never been able to come up with that myself.
I have the following struct declaration:
struct Hash_Table(Key, Value, u32 delegate(ref Key)
custom_hash_function = null){
...
}
When I try to instance the Type like this:
Hash_Table!(Component*, Component_Tick_Info, (c) =>
hash32(c.handle.bitfield)) my_hash_table;
I get the
On Wednesday, 21 October 2020 at 20:10:03 UTC, Paul Backus wrote:
On Wednesday, 21 October 2020 at 19:23:43 UTC, Simon van Bernem
wrote:
The only explanation I can think of is that D memcmps the
entire struct including the padding. Is this correct?
If so, what can I do about this? Why doesn't
I ask this question because I chased a very very nasty bug all
the way down, and I think I found the offender:
I have a extern(C++) struct that contains an 8-byte integer
followed by a 4-byte enum value. I came across two variables of
that type, that are not equal by comparison (no opEquals