27 #ifndef MLN_ACCU_COUNT_VALUE_HH
28 # define MLN_ACCU_COUNT_VALUE_HH
34 # include <mln/accu/internal/base.hh>
35 # include <mln/core/concept/meta_accumulator.hh>
36 # include <mln/metal/is_a.hh>
43 template <
typename V>
struct count_value;
53 struct accumulator_< accu::count_value<V> >
55 typedef accumulator::has_untake::yes
has_untake;
57 typedef accumulator::has_stop::no
has_stop;
58 typedef accumulator::when_pix::use_v
when_pix;
119 template <
typename V>
131 # ifndef MLN_INCLUDE_ONLY
133 template <
typename V>
141 template <
typename V>
150 template <
typename V>
158 template <
typename V>
167 template <
typename V>
172 mln_precondition(other.is_valid());
173 mln_precondition(other.ref_ == ref_);
174 count_ += other.count_;
177 template <
typename V>
186 template <
typename V>
191 mln_precondition(other.is_valid());
192 mln_precondition(other.ref_ == ref_);
193 count_ -= other.count_;
196 template <
typename V>
205 template <
typename V>
213 template <
typename V>
221 # endif // ! MLN_INCLUDE_ONLY
228 #endif // ! MLN_ACCU_COUNT_VALUE_HH