/////////////////////////////////////////////////////////////////////////
template <typename _Facade, typename T>
- class inc_decl
+ class operator_inc_decl
{
private:
T& m_value;
public:
- inc_decl(T& value) : m_value(value) {}
+ operator_inc_decl(T& value) : m_value(value) {}
_Facade& operator ++(int){ m_value++; return *this; }
_Facade& operator --(int){ m_value--; return *this; }
- _Facade& operator ++(){ _Facade work=*this; m_value++; return work; }
- _Facade& operator --(){ _Facade work=*this; m_value--; return work; }
+ _Facade& operator ++(){ _Facade work=*this; work++; return work; }
+ _Facade& operator --(){ _Facade work=*this; work--; return work; }
};
/////////////////////////////////////////////////////////////////////////
template <typename _Facade, typename T>
- class plus_minus
+ class operator_plus_minus
{
protected:
T& m_value;
public:
- plus_minus(T& value) : m_value(value) {}
+ operator_plus_minus(T& value) : m_value(value) {}
- _Facade& operator +=(int n){ m_index+=n; return *this; }
- _Facade& operator -=(int n){ m_index-=n; return *this; }
+ _Facade& operator +=(int n){ m_value+=n; return *this; }
+ _Facade& operator -=(int n){ m_value-=n; return *this; }
_Facade& operator +(int n){ _Facade work=*this; work+=n; return work; }
_Facade& operator -(int n){ _Facade work=*this; work-=n; return work; }
};
+
+ /////////////////////////////////////////////////////////////////////////
}
}