Skip to content

Commit 390bcb5

Browse files
Vipul-Cariappaaaronj0
authored andcommitted
force creation of std::exception early
`std::exception` is supposed to inherit from `BaseException` if other classes that inherit `std::exception` are created first, then the Python wrapper class of `std::exception` no longer inherits `BaseException`
1 parent 8710637 commit 390bcb5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

python/cppyy/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,10 @@ def _set_pch():
8585
sys.modules['cppyy.gbl.std'] = gbl.std
8686

8787

88+
#- force creation of std.exception -------------------------------------------------------
89+
_e = gbl.std.exception
90+
91+
8892
#- enable auto-loading -------------------------------------------------------
8993
try: gbl.cling.runtime.gCling.EnableAutoLoading()
9094
except: pass

0 commit comments

Comments
 (0)