[C++-sig] class registration - bug or feature?

Damien Gleizes gleizesd at gmail.com
Wed Jul 5 19:26:10 CEST 2006


I'm not a specialist but I would say that it is the desired behaviour:
class_<X>("X");                //register the class X 

class_<X>("X")                 //register the class X again
.def( "do_smth", &X::do_smth );//register the func do_smth in the class X 


You might probably want to do something like that:
class_<X> MyClass("X");
MyClass.def( "do_smth", &X::do_smth );


I am not sure it is correct as I did'nt try...




More information about the Cplusplus-sig mailing list