The name *imag-if-needed* denotes an exposition-only function object.

The expression *imag-if-needed*(E) for a subexpression E
whose type is T is expression-equivalent to:

- imag(E),
if T is not an arithmetic type and the expression imag(E)
is valid, with overload resolution performed in a context
that includes the declaration
template<class T> T imag(const T&) = delete;
If the function selected by overload resolution does not return the imaginary part of its input, the program is ill-formed, no diagnostic required;
- otherwise, ((void)E, T{}).