olena-2.0-125-g1acdaf8 mln/value/intsub.hh: Add operator=(literal::zero).

--- milena/ChangeLog | 4 ++++ milena/mln/value/intsub.hh | 9 +++++++++ 2 files changed, 13 insertions(+), 0 deletions(-) diff --git a/milena/ChangeLog b/milena/ChangeLog index a02e163..e939e2c 100644 --- a/milena/ChangeLog +++ b/milena/ChangeLog @@ -1,5 +1,9 @@ 2012-10-23 Guillaume Lazzara <z@lrde.epita.fr> + * mln/value/intsub.hh: Add operator=(literal::zero). + +2012-10-23 Guillaume Lazzara <z@lrde.epita.fr> + Improve support for mean and median functions. * mln/fun/vv2v/median.hh, diff --git a/milena/mln/value/intsub.hh b/milena/mln/value/intsub.hh index 5cf6ca5..ae71803 100644 --- a/milena/mln/value/intsub.hh +++ b/milena/mln/value/intsub.hh @@ -148,6 +148,7 @@ namespace mln template <unsigned m> intsub<n>& operator=(const intsub<m>& rhs); intsub<n>& operator=(const intsub<n>& rhs); + intsub<n>& operator=(const literal::zero_t&); intsub<n>& operator=(int i); intsub<n>& operator=(float i); intsub<n>& operator=(double i); @@ -354,6 +355,14 @@ namespace mln template <unsigned n> intsub<n>& + intsub<n>::operator=(const literal::zero_t&) + { + this->v_ = 0; + return *this; + } + + template <unsigned n> + intsub<n>& intsub<n>::operator=(int i) { this->v_ = n * i; -- 1.7.2.5
participants (1)
-
Guillaume Lazzara