id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 6919,g++ -std=c++11 breaks class inheritance with boost::shared_ptr,altan@…,Ralf W. Grosse-Kunstleve," This simple program was developed to test sharing a C++ class with inheritance to Python. Output crashes inside boost::python when it is compiled by -std=c++11 flag in g++ 4.7.0 (NOTE: It works ok with g++ 4.4.6 -std=c++0x) Compiler: GNU 4.7.0 Platforms: Centos 6.2, Mac OS X Lion Boost: 1.49.0 Python: 2.7.3 // Crash when running test3 produced by: //g++ test3.cc -I../../ext/boost/Linux/include -I../../ext/python/Linux/include ../../ext/boost/Linux/lib/libboost_python.a ../../ext/python/Linux/lib/libpython.so -o test3 -std=c++11 // // No crash when running test3 produced by: //g++ test3.cc -I../../ext/boost/Linux/include -I../../ext/python/Linux/include ../../ext/boost/Linux/lib/libboost_python.a ../../ext/python/Linux/lib/libpython.so -o test3 // #include #include #include #include using namespace std; namespace bp = boost::python; struct Foo{ virtual void doSomething() { cout << ""Foo"" << endl; } }; struct Goo : Foo { virtual void doSomething() { cout << ""Goo"" << endl; } }; BOOST_PYTHON_MODULE(hello) { bp::class_ >(""Foo"") .def(""doSomething"", &Foo::doSomething); bp::class_, boost::shared_ptr >(""Goo""); }; // NOTE: Output works allright when there is no shared_ptr in bp::class_ above int main(int argc, char **argv) { Py_Initialize(); bp::object main = bp::import(""__main__""); bp::object main_namespace = main.attr(""__dict__""); inithello(); main_namespace[""hello""] = bp::import(""hello""); bp::exec(""a = hello.Goo(); a.doSomething()"", main_namespace); //Py_Main(argc, argv); Py_Finalize(); return 0; } ",Bugs,closed,To Be Determined,python USE GITHUB,Boost 1.49.0,Problem,invalid,boost python class inheritance c++11,altan@…