If you want the next representable value after 1, there is a function for that called std::nextafter, from the <cmath> header.
float result = std::nextafter(1.0f, 2.0f);
It returns the next representable value starting from the first argument in the direction of the second argument. So if you wanted to find the next value below 1, you could do this:
float result = std::nextafter(1.0f, 0.0f);
Adding the smallest positive representable value to 1 doesn’t work because the difference between 1 and the next representable value is greater than the difference between 0 and the next representable value.