First six in line are currently Charles, William, Wlliam's child (technically 'a life in being' already), Harry, Andrew and Beatrice. When Alfonso XII of Spain died in 1886, there was a vacancy of the throne during the wait to see whether his pregnant Queen produced a son or daughter. The child proved to be Alfonso XIII (1886-1931). It might be argued that as William's child will now succeed irrespective of sex, then if William were already reigning, and died during Kate's pregnancy, then there would be no vacancy of the throne. There is a precedent from Byzantine times of a monarch being crowned in utero. It's in JJ Norwich's Byzantium: The Early Centuries, and the unborn monarch was, I think, a Persian. Will look it up.
Ann