Exercism c++ problem

By this, they mean: "don't use __builtin_popcount()" or similar functions.
Primitive C/C++ Bit operations are fine.