Skip to content

[Question] Is UFCS supposed to use ADL? #681

Answered by JohelEGP
guybrush77 asked this question in Q&A
Discussion options

You must be logged in to vote

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.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@guybrush77
Comment options

@JohelEGP
Comment options

Answer selected by guybrush77
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants