We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Example of failure: https://run.dlang.io/is/MQZ4Ye
/+dub.sdl: dependency "vibe-d" version="~>0.8.5" +/ void main() { import vibe.utils.hashmap; import vibe.internal.allocator; final class Integer : Object { public const int value; this(int x) @nogc nothrow pure @safe { value = x; } override bool opEquals(Object rhs) const @nogc nothrow pure @safe { if (auto r = cast(Integer) rhs) return value == r.value; return false; } override size_t toHash() const @nogc nothrow pure @safe { return value; } } auto hashMap = HashMap!(Object, int)(vibeThreadAllocator()); foreach (x; [2, 4, 8, 16]) hashMap[new Integer(x)] = x; foreach (x; [2, 4, 8, 16]) assert(hashMap[new Integer(x)] == x); }
Related PR #2292.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Example of failure:
https://run.dlang.io/is/MQZ4Ye
Related PR #2292.
The text was updated successfully, but these errors were encountered: