  Topological invariants built from the periodic Bloch functions characterize
new phases of matter, such as topological insulators and topological
superconductors. The most important topological invariant is the Chern number
that explains the quantized conductance of the quantum Hall effect. Here, we
provide a general result for the superfluid weight $D_{\rm s}$ of a multiband
superconductor that is applicable to topologically nontrivial bands with
nonzero Chern number $C$. We find that the integral over the Brillouin zone of
the quantum metric, an invariant calculated from the Bloch functions, gives the
superfluid weight in a flat band, with the bound $D_{\rm s} \geq |C|$. Thus,
even a flat band can carry finite superfluid current, provided the Chern number
is nonzero. As an example, we provide $D_{\rm s}$ for the time-reversal
invariant attractive Harper-Hubbard model that can be experimentally tested in
ultracold gases. In general, our results establish that a topologically
nontrivial flat band is a promising concept for increasing the critical
temperature of the superconducting transition.
