Background:The microscopic composition and properties of infinite hadronic matter at a wide range of densities and temperatures have been subjects of intense investigation for decades. The equation of state (EoS) relating pressure, energy density, and temperature at a given particle number density is essential for modeling compact astrophysical objects such as neutron stars, core-collapse supernovae, and related phenomena, including the creation of chemical elements in the universe. The EoS depends not only on the particles present in the matter, but, more importantly, also on the forces acting among them. Because a realistic and quantitative description of infinite hadronic matter and nuclei from first principles in not available at present, a large variety of phenomenological models has been developed in the past several decades, but the scarcity of experimental and observational data does not allow a unique determination of the adjustable parameters. Purpose: It is essential for further development of the field to determine the most realistic parameter sets and to use them consistently. Recently, a set of constraints on properties of nuclear matter was formed and the performance of 240 nonrelativistic Skyrme parametrizations was assessed [M. Dutra et al., Phys. Rev. C 85, 035201 (2012)] in describing nuclear matter up to about three times nuclear saturation density. In the present work we examine 263 relativistic-mean-field (RMF) models in a comparable approach. These models have been widely used because of several important aspects not always present in nonrelativistic models, such as intrinsic Lorentz covariance, automatic inclusion of spin, appropriate saturation mechanism for nuclear matter, causality, and, therefore, no problems related to superluminal speed of sound in medium. Method: Three different sets of constraints related to symmetric nuclear matter, pure neutron matter, symmetry energy, and its derivatives were used. The first set (SET1) was the same as used in assessing the Skyrme parametrizations. The second and third sets (SET2a and SET2b) were more suitable for analysis of RMF and included, up-to-date theoretical, experimental and empirical information. Results: The sets of updated constraints (SET2a and SET2b) differed somewhat in the level of restriction but still yielded only 4 and 3 approved RMF models, respectively. A similarly small number of approved Skyrme parametrizations were found in the previous study with Skyrme models. An interesting feature of our analysis 0556-2813/2014/90(5)/055203 (35) 055203-1 ©2014 American Physical Society M. DUTRA et al.PHYSICAL REVIEW C 90, 055203 (2014) has been that the results change dramatically if the constraint on the volume part of the isospin incompressibility (K τ,v ) is eliminated. In this case, we have 35 approved models in SET2a and 30 in SET2b. Conclusions: Our work provides a new insight into application of RMF models to properties of nuclear matter and brings into focus their problematic proliferation. The assessment performed in this wo...