fork(1) download
  1. #include <stdint.h>
  2.  
  3. class C64 {
  4.  
  5. uint64_t Value;
  6.  
  7. public:
  8.  
  9. C64 () : Value (0) { }
  10.  
  11. operator uint64_t () const { return Value; }
  12. operator int64_t () const { return Value; }
  13. void operator = (uint64_t S) { Value = S; }
  14. void operator = (int64_t S) { Value = S; }
  15. void operator = (int S) { Value = S; }
  16. void operator = (unsigned int S) { Value = S; }
  17. };
  18.  
  19. bool operator== (C64 a, int b) {
  20. return (int64_t)a == b;
  21. }
  22.  
  23. bool operator== (int a, C64 b) {
  24. return b == a;
  25. }
  26.  
  27. void f () {
  28.  
  29. C64 c;
  30.  
  31. int i = 0;
  32. unsigned int ui = 0;
  33.  
  34. bool b = (c == 0);
  35.  
  36. c = i;
  37. c = ui;
  38.  
  39. }
  40.  
  41. int main() {
  42. f();
  43. }
Success #stdin #stdout 0s 15224KB
stdin
Standard input is empty
stdout
Standard output is empty