This repository was archived by the owner on Aug 5, 2026. It is now read-only.
Repository navigation
Penalise void* arguments in overload priority as intended - #225
Open
conrade-ctc wants to merge 1 commit into
Open
conrade-ctc wants to merge 1 commit into
conrade-ctc wants to merge 1 commit into
Conversation
The penalty was unreachable: it sat behind an IsBuiltin() check, and no pointer spelling is reported as builtin, and it matched "void*" while argument types are spelled "const void *". So a class with both a converting constructor and a const void* one resolved by declaration order, and a handle passed where the const handle was expected arrived as the proxy's address.
conrade-ctc
force-pushed
the
conrade/voidp-overload-priority
branch
from
July 31, 2026 13:53
c2a161f to
16ce220
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CPPMethod::GetPriority'svoid*penalty never applied, for two independent reasons: it sits behindCppyy::IsBuiltin(aname)and no pointer spelling is builtin (IsBuiltinis an exact lookup over a set containing"void"), and it tested for"void*"while argument types are spelled"const void *".So a class with both a converting constructor and a
const void*one resolved by declaration order, and a handle passed where its const counterpart was expected arrived as the proxy's address:Match on the whitespace-compacted name, ahead of the builtin branch.
Regression test: compiler-research/cppyy#239
Context: compiler-research/CppInterOp#1078