Skip to content

Conversation

@hvdijk
Copy link
Contributor

@hvdijk hvdijk commented Oct 28, 2024

If UrReturnHelper's operator() is explicitly called as operator()<T>(...), there is a potential for ambiguity when the specified RetType and the inferred T are the same: this is ambiguous with the version of operator() where only T is a template parameter, and T is specified explicitly. We already have code that explicitly calls operator()<T>(...), so prevent this from becoming a problem.

I saw this in an unsupported DPC++ build configuration, 32-bit x86, but expect it to come up in future supported DPC++ build configurations as well.

Note: IMHO, the fact that this is so awkward to call suggests to me that this possibly should not be an overload of operator() in the first place, but changing that does have the potential to break things, so I just left that as it is now.

@hvdijk hvdijk requested a review from a team as a code owner October 28, 2024 16:41
@hvdijk
Copy link
Contributor Author

hvdijk commented Oct 28, 2024

intel/llvm PR: intel/llvm#15895

If UrReturnHelper's operator() is explicitly called as
operator()<T>(...), there is a potential for ambiguity when the
specified RetType and the inferred T are the same: this is ambiguous
with the version of operator() where only T is a template parameter,
and T is specified explicitly. We already have code that explicitly
calls operator()<T>(...), so prevent this from becoming a problem.
@hvdijk hvdijk force-pushed the urreturnhelper-ambiguity branch from 5f11b49 to f6d00b8 Compare November 1, 2024 11:09
@kbenzie kbenzie added the ready to merge Added to PR's which are ready to merge label Nov 5, 2024
@callumfare callumfare merged commit 2aaa261 into oneapi-src:main Nov 8, 2024
77 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready to merge Added to PR's which are ready to merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants