You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
importcppyycppyy.cppdef(r"""namespace X { class C {};}namespace Y { namespace Z { template <typename T> void f() {} } namespace X { class D {}; }}""")
cppyy.gbl.Y.Z.f[type(cppyy.gbl.X.C)]()
I would expect this to work (and do nothing) but instead I get:
TypeError: Could not find "f<X::C>" (set cppyy.set_debug() for C++ errors):
Failed to instantiate "f<X::C>()"
With cppyy.set_debug(), I get:
lookup.funcname.file:1:6: error: no member named 'C' in namespace 'Y::X'
f<X::C>
So the type is translated incorrectly here. It should be ::X::C I guess.
This happened with the latest cppyy (3.1.2) from conda-forge on Linux and also with the cppyy from pip on Linux.
The text was updated successfully, but these errors were encountered:
saraedum
added a commit
to saraedum/cppyythonizations
that referenced
this issue
Aug 15, 2024
Consider the following code snippet:
I would expect this to work (and do nothing) but instead I get:
With
cppyy.set_debug()
, I get:So the type is translated incorrectly here. It should be
::X::C
I guess.This happened with the latest cppyy (3.1.2) from conda-forge on Linux and also with the cppyy from pip on Linux.
The text was updated successfully, but these errors were encountered: