Warning: session_start(): open(/var/lib/php/sessions/sess_r56iqb7qprkb1ff7r31v61vnqn, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
!7
sclass X {
S value;
*() {}
*(S *value) {}
}
p {
Hasher hasher = new Hasher() {
public int hashCode(X o) { ret _hashCode(o.value); }
public bool equals(X a, X b) { ret a == null ? b == null : b != null && eq(a.value, b.value); }
};
CustomCompactHashSet set = new(hasher);
X x1 = X("hello");
set.add(x1);
assertTrue(set.contains(new X("hello")));
assertFalse(set.contains(new X("world")));
assertSame(x1, set.find(new X("hello")));
assertNull(set.find(new X("world")));
set.remove(x1);
assertNull(set.find(new X("hello")));
print("OK");
}