Advertisement
Guest User

Untitled

a guest
Apr 17th, 2014
34
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. struct uint32 {
  2. unsigned int x_;
  3. uint32(unsigned int x) : x_(x) {}
  4. uint32(const uint32 &oth) : x_(oth.x_) {}
  5. uint32 &operator=(const uint32 &oth) { x_ = oth.x_; return *this; }
  6. operator unsigned int() const { return x_; }
  7. };
  8.  
  9. static inline uint32 operator+(const uint32 &a, const uint32 &b) {
  10. return uint32(ObfuscatedAdder<unsigned int>::eval(a.x_, b.x_));
  11. }
  12.  
  13. unsigned int foo = 5 + 7;
  14.  
  15. uint32 a = 5;
  16. uint32 b = 7;
  17. unsigned int foo = a + b;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement