Gravitational-wave measurements of the tidal deformability in neutron-star binary coalescences can be used to infer the still unknown equation of state (EoS) of dense matter above the nuclear saturation density. By employing a Bayesian-ranking test we quantify the ability of current and future gravitational-wave observations to discriminate among families of realistic EoS which differ in particle content and ab-initio microscopic calculations. While the constraining power of GW170817 is limited, stringent constraints can be placed with approximately 10 coalescences detected by LIGO-Virgo at design sensitivity, but only for relatively stiff EoS which are already marginally in tension with GW170817. However, we show that even just a single detection with a third-generation detector such as the Einstein Telescope or Cosmic Explorer will rule out several families of EoS with very strong statistical significance, and can discriminate among models which feature similar softness, hence constraining the properties of nuclear matter to unprecedented levels.