[Question] Is UFCS supposed to use ADL? #681
Answered
by
JohelEGP
guybrush77
asked this question in
Q&A
-
Sorry if this had been asked before, but is UFCS supposed to use ADL? For example:
|
Beta Was this translation helpful? Give feedback.
Answered by
JohelEGP
Sep 15, 2023
Replies: 1 comment 2 replies
-
Depends on what you mean by "suppose". |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
guybrush77
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Depends on what you mean by "suppose".
It can use ADL.
But it doesn't have to.
AFAIK, UFCS is simply defined as
𝘰𝘣𝘫.𝘧(𝘢𝘳𝘨𝘴)
if that is well-formed, and𝘧(𝘰𝘣𝘫, 𝘢𝘳𝘨𝘴)
otherwise.So by definition of the Cpp1 semantics of (non-member) function call, it can use ADL.