The relevant part of the standard is ยง5.2.4 / 1:
Using a pseudo-destructor-name after the dot. or an arrow โ represents a destructor for a non-class type with the type name. The result should be used only as an operand for the function call operator (), and the result of such a call is of type void. The only effect is the evaluation of the postfix expression in front of the point or arrow.
source share