Problems with pure virtual methods.
April 30, 2004
3:19 a.m.
In using Boost.Python version 1_31_0 with pyste version 0.9.28, and gcc version 3.3, I've run into a problem with pure virtual methods. The problem is expressed a calling a base class method that employs an abstract method also defined in the same class. I'm providing an example that demonstrates the problem. The solution is to give the abstract method an implementation in the base class (making it just a virtual method). Note that this is far from desirable in that it precludes the use of abstract methods. The actual python runtime error can vary with this problem. With the provided example the error is: ReferenceError: Attempt to return dangling reference to object of type: std::string
8194
Age (days ago)
8194
Last active (days ago)
0 comments
1 participants
participants (1)
-
Jeff Holle