const std = @import("std");
const alloc = std.testing.allocator;
test "tuples as keys" {
var map: std.AutoHashMap(struct { usize, usize }, void) = std.AutoHashMap(struct { usize, usize }, void).init(alloc);
defer map.deinit();
try map.put(.{ 10, 12 }, {});
try map.put(.{ 12, 11 }, {});
try std.testing.expect(map.contains(.{ 10, 12 }));
_ = map.remove(.{ 10, 12 });
try std.testing.expect(!map.contains(.{ 10, 12 }));
}
The test does run but I was wondering if this is a reasonable thing to do.