Testing the performance of a loop for a vector of unique_ptr
Most of your loops are executing in no time at all because the optimizer is eliminating them since they have no side effects.  You need to do something observable with them, like summing all elements and returning that sum from the function.  Declare a new variable int sum = 0 before the loops, replace the int num = lines with sum +=, then return sum; at the end of the function.  This will require changing the return type for all of them to int, and changing the type of pointer passed to TestLoop.

std::vector::max_size returns a theoretical maximum, not one determined on your current system specs.  In your case, it returns 0x3FFFFFFF, which is the maximum number of 32 bit pointers that can be stored in a 32 bit address program.  This max size also doesn't consider any additional storage space required by objects stored within the vector.  Every element you have is a unique_ptr, which when allocated will take 4 bytes for the int, plus additional overhead for the memory management system (so at least 12 or more likely 16 bytes).

Your program crashes with more then 70 million elements because it runs out of memory.