mirror of
https://github.com/tfussell/xlnt.git
synced 2024-03-22 13:11:17 +08:00
make binary arithmetic operators for column_t non-member.
This commit is contained in:
parent
23f65602de
commit
211cd7a363
|
@ -231,27 +231,27 @@ public:
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Return the result of adding rhs to this column.
|
/// Return the result of adding rhs to this column.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
column_t operator+(const column_t &rhs);
|
friend column_t operator+(column_t lhs, const column_t& rhs);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Return the result of adding rhs to this column.
|
/// Return the result of subtracing lhs by rhs column.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
column_t operator-(const column_t &rhs);
|
friend column_t operator-(column_t lhs, const column_t& rhs);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Return the result of adding rhs to this column.
|
/// Return the result of multiply lhs by rhs column.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
column_t operator*(const column_t &rhs);
|
friend column_t operator*(column_t lhs, const column_t& rhs);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Return the result of adding rhs to this column.
|
/// Return the result of divide lhs by rhs column.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
column_t operator/(const column_t &rhs);
|
friend column_t operator/(column_t lhs, const column_t& rhs);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Return the result of adding rhs to this column.
|
/// Return the result of mod lhs by rhs column.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
column_t operator%(const column_t &rhs);
|
friend column_t operator%(column_t lhs, const column_t& rhs);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Add rhs to this column and return a reference to this column.
|
/// Add rhs to this column and return a reference to this column.
|
||||||
|
|
|
@ -252,30 +252,15 @@ column_t column_t::operator++(int) { column_t copy(index); ++(*this); return cop
|
||||||
/// </summary>
|
/// </summary>
|
||||||
column_t column_t::operator--(int) { column_t copy(index); --(*this); return copy; }
|
column_t column_t::operator--(int) { column_t copy(index); --(*this); return copy; }
|
||||||
|
|
||||||
/// <summary>
|
column_t operator+(column_t lhs, const column_t& rhs) { lhs += rhs; return lhs; }
|
||||||
/// Return the result of adding rhs to this column.
|
|
||||||
/// </summary>
|
|
||||||
column_t column_t::operator+(const column_t &rhs) { column_t copy(*this); copy.index += rhs.index; return copy; }
|
|
||||||
|
|
||||||
/// <summary>
|
column_t operator-(column_t lhs, const column_t& rhs) { lhs -= rhs; return lhs; }
|
||||||
/// Return the result of adding rhs to this column.
|
|
||||||
/// </summary>
|
|
||||||
column_t column_t::operator-(const column_t &rhs) { column_t copy(*this); copy.index -= rhs.index; return copy; }
|
|
||||||
|
|
||||||
/// <summary>
|
column_t operator*(column_t lhs, const column_t& rhs) { lhs *= rhs; return lhs; }
|
||||||
/// Return the result of adding rhs to this column.
|
|
||||||
/// </summary>
|
|
||||||
column_t column_t::operator*(const column_t &rhs) { column_t copy(*this); copy.index *= rhs.index; return copy; }
|
|
||||||
|
|
||||||
/// <summary>
|
column_t operator/(column_t lhs, const column_t& rhs) { lhs /= rhs; return lhs; }
|
||||||
/// Return the result of adding rhs to this column.
|
|
||||||
/// </summary>
|
|
||||||
column_t column_t::operator/(const column_t &rhs) { column_t copy(*this); copy.index /= rhs.index; return copy; }
|
|
||||||
|
|
||||||
/// <summary>
|
column_t operator%(column_t lhs, const column_t& rhs) { lhs %= rhs; return lhs; }
|
||||||
/// Return the result of adding rhs to this column.
|
|
||||||
/// </summary>
|
|
||||||
column_t column_t::operator%(const column_t &rhs) { column_t copy(*this); copy.index %= rhs.index; return copy; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Add rhs to this column and return a reference to this column.
|
/// Add rhs to this column and return a reference to this column.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user