In my program I need to check if I have already generated a value in a set of 2.5*10^9. I expect to generate about the half of the set and need to have a fast way to check a
I think the following solution is better than using new
std::vector> wrapper(1);
auto & cover = wrapper[0];//To avoide unnecessary indirection by wrapper[0]
To demonstrate
int main(){
std::vector> wrapper(1);
auto & cover = wrapper[0];
cover[0] = 1;
std::cout << cover[0] << " " << cover[2500000000UL - 1];
}