  We use a compilation of cosmic microwave anisotropy data to constrain the
epoch of reionization in the Universe, as a function of cosmological
parameters. We consider spatially-flat cosmologies, varying the matter density
$\Omega_0$ (the flatness being restored by a cosmological constant), the Hubble
parameter $h$ and the spectral index $n$ of the primordial power spectrum. Our
results are quoted both in terms of the maximum permitted optical depth to the
last-scattering surface, and in terms of the highest allowed reionization
redshift assuming instantaneous reionization. For critical-density models,
significantly-tilted power spectra are excluded as they cannot fit the current
data for any amount of reionization, and even scale-invariant models must have
an optical depth to last scattering of below 0.3. For the currently-favoured
low-density model with $\Omega_0 = 0.3$ and a cosmological constant, the
earliest reionization permitted to occur is at around redshift 35, which
roughly coincides with the highest estimate in the literature. We provide
general fitting functions for the maximum permitted optical depth, as a
function of cosmological parameters. We do not consider the inclusion of tensor
perturbations, but if present they would strengthen the upper limits we quote.
