Interestingly, in the US, for all its "optimistic" procedures, a controller isn't allowed to issue a conditional ("behind X") line-up-and-wait.
But, if an arriving aircraft is still on the runway, a controller can clear a departing aircraft for takeoff if there will be adequate separation when the departing aircraft starts takeoff roll (i.e., the arriving aircraft will be clear of the runway at that point).
But, if an arriving aircraft is still on the runway, a controller can clear a departing aircraft for takeoff if there will be adequate separation when the departing aircraft starts takeoff roll (i.e., the arriving aircraft will be clear of the runway at that point).
[1] 7110.65 3-9-5 Anticipating Separation