  A search for doubly charged Higgs bosons with pairs of prompt, isolated,
highly energetic leptons with the same electric charge is presented. The search
uses a proton-proton collision data sample at a centre-of-mass energy of 13 TeV
corresponding to 36.1 $\mathrm{fb}^{-1}$ of integrated luminosity recorded in
2015 and 2016 by the ATLAS detector at the LHC. This analysis focuses on the
decays $H^{\pm\pm}\rightarrow e^{\pm}e^{\pm}$, $H^{\pm\pm}\rightarrow
e^{\pm}\mu^{\pm}$ and $H^{\pm\pm}\rightarrow \mu^{\pm}\mu^{\pm}$, fitting the
dilepton mass spectra in several exclusive signal regions. No significant
evidence of a signal is observed and corresponding limits on the production
cross-section are derived at 95% confidence level. The observed lower limit on
the mass of a doubly charged Higgs boson only coupling to left-handed leptons
($e$,$\mu$) varies from 770 GeV to 870 GeV (850 GeV expected) for
$B(H^{\pm\pm}\rightarrow \ell^{\pm}\ell^{\pm})$ = 100% and both the expected
and observed mass limits are above 450 GeV for $B(H^{\pm\pm}\rightarrow
\ell^{\pm}\ell^{\pm})$ = 10% and any combination of partial branching ratios.
