There is no mathematically exact (infinite number of decimal places) definition of the temperature. Statistically speaking the temperature is a parameter of the Boltzmann distribution: If you pick up a particle of gaz from a thermalized (what is it??) volume, then, at temperature $T$, probability for it to have energy $E$ is $e^{-E/kT}$ where $k$ is the Boltzmann constant. So, in an experiment, you can start picking gas molecules, measure energy of each, create histogram (energy on $x$ axis, number of occurences on $y$ axis) and fit it with function $e^{-E/kT}$ (where you consider $T$ as a free parameter). Then the $T_{opt}$ leading to the optimal fit is the temperature. However, temperature is not a number "written on the sky", gaz particles gain their energy not by obeing some objectively existing distribution, but they gain their energy in chaotic microscopic collisions, which (we believe), should with high precision correspond in output to Boltzmann distribution. There is no "objective" temperature and there is no way to make it objective. It you adopt the statistical approach then, in the experiment I described, the number $T_{opt}$ is, strictly speaking, the most probable value of the tempereture. But, actually, the "true" temperature can be completely different however with very small probability. There is actually a statistical error (sigma of the distribution) to the most probable value. In systems with standard size (one Mole of particles) the error is placed somewhere around 13$th$ decimal place. Places beyond cannot be defined.
EDIT: I somehow forgot to make point about "generality" of my answer. Whatever is supposed to have a temperature (back hole, vacuum as seen from an accelerated frame, .... anything as long as it has the black color) simply has to have associated (black body) radiation, i.e. outgoing (thermalized) gaz of photon particles, where the definition I propose should be applied (photon energies follow Boltzmann distribution).