void Process(val_t anotherval ) { if( anotherval < min ) min = anotherval; else if( anotherval > max ) max = anotherval; ++cntavg; accavg += anotherval; avg = static_cast<val_t>(accavg / cntavg); auto result = distribution.try_emplace( anotherval, 1 ); if( !result.second && (result.first != distribution.end()) ) { (result.first->second) += 1; } }