зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1122160 Add operator+=() and operator-=() to DebugOnly r=froydnj
This commit is contained in:
Родитель
8ebcff8383
Коммит
e22cba5e2b
|
@ -51,6 +51,10 @@ 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 ooperators. Defining explicit methods here
|
||||
// will create ambiguity the compiler can't deal with.
|
||||
|
||||
T* operator&() { return &value; }
|
||||
|
||||
operator T&() { return value; }
|
||||
|
@ -66,6 +70,8 @@ public:
|
|||
DebugOnly& operator=(const T&) { return *this; }
|
||||
void operator++(int) { }
|
||||
void operator--(int) { }
|
||||
DebugOnly& operator+=(const T&) { return *this; }
|
||||
DebugOnly& operator-=(const T&) { return *this; }
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
|
Загрузка…
Ссылка в новой задаче