Skip to content

Instantly share code, notes, and snippets.

View guohai's full-sized avatar
🎱
Hey

Brent G guohai

🎱
Hey
View GitHub Profile
#define DECLARE_ENUM(E) struct E { public: E(int value = 0) : _value((__Enum)value) { } E& operator=(int value) { this->_value = (__Enum)value; return *this; } operator int() const { return this->_value; } enum __Enum {
#define END_ENUM() }; private: __Enum _value; };
#include <iostream>
using namespace std;
class B {
B &operator=(const B &);
};