Step by step:
T()
constructs a temporary, value-initialized instance of T.
T() < x
compares x
, which is a T
instance, with the temporary T()
using less-than operator<
.
!(T() < x)
negates the result of that comparison
It is checking that the argument x
is greater than a value-initialized T
, and throwing an exception if this is not the case.
It relies on T
being a built-in type (in which case, value initialization is zero initialization), or a default constructible user defined type (in which case value initialization calls the default constructor). It also requires that an operator<
exits that can compare two T
instances and return something convertible to bool
.
See here for more on value initialization.