Skip to content

[cppyy] fix: aliasing of TemplateProxy#21522

Open
Vipul-Cariappa wants to merge 2 commits intoroot-project:masterfrom
Vipul-Cariappa:dev/Pythonize-TemplateProxy
Open

[cppyy] fix: aliasing of TemplateProxy#21522
Vipul-Cariappa wants to merge 2 commits intoroot-project:masterfrom
Vipul-Cariappa:dev/Pythonize-TemplateProxy

Conversation

@Vipul-Cariappa
Copy link
Contributor

Fixes: #21405

Copy link
Contributor

@guitargeek guitargeek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, makes sense to me! Thanks for fixing this issue.

Copy link
Member

@vepadulano vepadulano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice thank you! I just had a minor suggestion, feel free to disregard.

Co-authored-by: Vincenzo Eduardo Padulano <[email protected]>
@github-actions
Copy link

github-actions bot commented Mar 6, 2026

Test Results

    22 files      22 suites   3d 2h 24m 0s ⏱️
 3 831 tests  3 829 ✅ 1 💤 1 ❌
75 737 runs  75 727 ✅ 9 💤 1 ❌

For more details on these failures, see this check.

Results for commit 8f21994.

@hahnjo
Copy link
Member

hahnjo commented Mar 6, 2026

FWIW this fixes the "original" minimal reproducer #21405, but using it once "breaks" other overloads:

>>> import ROOT
>>> ROOT.gInterpreter.Declare("struct A { template <typename... Ts> void m(std::vector<int> v) {} template <typename T = void> void m(int i) {} };")
True
>>> a = ROOT.A()
>>> type(a)._m = type(a).m
>>> type(a).m = lambda self, x: self._m(x)
>>> a.m(42)
>>> a.m([1, 2, 3])
>>> a.m(42)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: void A::m(vector<int> v) =>
    TypeError: could not convert argument 1

I'm not sure if this should be addressed here, or if it's a different issue

@dpiparo
Copy link
Member

dpiparo commented Mar 7, 2026

@Vipul-Cariappa ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[PyROOT] Assinging to TemplateProxy affects others

5 participants