Actually since all the elements to introduce are equal,
std::vector<float64_t> p(T,1.0/T);
should work good.