void checkIotaSum()

in benchmarks/concurrent_vector_benchmark.cpp [33:50]


void checkIotaSum(const Cont& c, int64_t sum) {
  if (sum != (static_cast<int64_t>(kLength - 1) * kLength) / 2) {
    std::cout << sum << " vs " << ((kLength - 1) * kLength) / 2 << std::endl;

    std::vector<uint8_t> accountedFor(kLength);
    for (auto v : c) {
      accountedFor[v] = 1;
    }

    for (size_t i = 0; i < kLength; ++i) {
      if (!accountedFor[i]) {
        std::cout << "missing " << i << std::endl;
      }
    }

    std::abort();
  }
}