cpp/utility/declval

Converts any type to a reference type, making it possible to use member functions in the operand of the  specifier without the need to go through constructors.

is commonly used in templates where acceptable template parameters may have no constructor in common, but have the same member function whose return type is needed.

Note that can only be used in unevaluated contexts and is not required to be defined; it is an error to evaluate an expression that contains this function. Formally, the program is ill-formed if this function is odr-used.

Parameters
(none)

Return value
Cannot be called and thus never returns a value. The return type is unless  is (possibly cv-qualified), in which case the return type is.