Added default type std::size_t for the second template parameter.
Removed second template parameter since it is not necessary anymore.
Substituted for-loop deploying std::transform and lambda function.