I would say that clang is correct, due to 13.3.1.2p3 (1st bullet).
For a unary operator
@
with an operand of a type whose cv-unqualified version isT1
, and for a binary operator@
with a left operand of a type whose cv-unqualified version isT1
and a right operand of a type whose cv-unqualified version isT2
, three sets of candidate functions, designated member candidates, nonmember candidates and built-in candidates, are constructed as follows:
- If
T1
is a complete class type, the set of member candidates is the result of the qualified lookup ofT1::operator@
(13.3.1.1.1); otherwise, the set of member candidates is empty.
(emphasis added by @sehe)