etcimon / botan

Block & stream ciphers, public key crypto, hashing, KDF, MAC, PKCS, TLS, ASN.1, BER/DER, etc.
Other
86 stars 22 forks source link

Workaround of wrong foreach inference #59

Closed shoo closed 1 year ago

shoo commented 2 years ago

In dmd 2.099.0-beta.1, I get four errors similar to the following. This pull request is a workaround.

source\botan\tls\channel.d(574,13): Error: `memutils.hashmap.HashMap!(ushort, ConnectionCipherState, ThreadMem).HashMap.opApply` called with argument types `(int delegate(ref const(ushort) k, ref const(ConnectionCipherState) v) @system)` matches both:
\dub\packages\memutils-1.0.4\memutils\source\memutils\hashmap.d(153,6):     `memutils.hashmap.HashMap!(ushort, ConnectionCipherState, ThreadMem).HashMap.opApply(int delegate(ref const(ushort), ref ConnectionCipherState) del)`
and:
\dub\packages\memutils-1.0.4\memutils\source\memutils\hashmap.d(162,6):     `memutils.hashmap.HashMap!(ushort, ConnectionCipherState, ThreadMem).HashMap.opApply(int delegate(in ref ushort, in
 ref ConnectionCipherState) del) const`
etcimon commented 1 year ago

This should no longer be needed with latest memutils.