Bug 1214958 - Add operators &=, |=, and ^= to mozilla::DebugOnly. r=froydnj

This commit is contained in:
L. David Baron 2015-10-19 20:42:28 -07:00
parent 6b1741396c
commit 0d9a430784

View File

@ -51,8 +51,8 @@ public:
void operator++(int) { value++; }
void operator--(int) { value--; }
// Do not define operator+=() or operator-=() here. These will coerce via
// the implicit cast and built-in operators. Defining explicit methods here
// Do not define operator+=(), etc. here. These will coerce via the
// implicit cast and built-in operators. Defining explicit methods here
// will create ambiguity the compiler can't deal with.
T* operator&() { return &value; }
@ -72,6 +72,9 @@ public:
void operator--(int) { }
DebugOnly& operator+=(const T&) { return *this; }
DebugOnly& operator-=(const T&) { return *this; }
DebugOnly& operator&=(const T&) { return *this; }
DebugOnly& operator|=(const T&) { return *this; }
DebugOnly& operator^=(const T&) { return *this; }
#endif
/*