See also: counter class reference.

Model of
Description

The counter class counts the number of passing signals. Each time it receives a signal, it will increment an internal counter and forward the signal.

Example

signals::counter<void ()> counter;

for (int i=0; i<33; i++)
    counter();
BOOST_CHECK_EQUAL(counter.count(), 33);