Boost C++ Libraries: Ticket #1246: breakage in boost::python svn trunk https://svn.boost.org/trac10/ticket/1246 <p> New python function sig code breaks this test case (gcc-4.1.2): </p> <p> #include &lt;boost/shared_ptr.hpp&gt; #include &lt;boost/python/module.hpp&gt; #include &lt;boost/python/def.hpp&gt; #include &lt;boost/python/class.hpp&gt; #include &lt;boost/python/init.hpp&gt; </p> <p> using namespace boost::python; </p> <p> struct base {}; struct concrete : public base {}; </p> <p> struct Test { </p> <blockquote> <p> Test (boost::shared_ptr&lt;base&gt; _x) : x (_x) {} boost::shared_ptr&lt;base&gt; x; </p> </blockquote> <p> }; </p> <p> BOOST_PYTHON_MODULE(test1) { </p> <blockquote> <p> class_&lt;base, boost::noncopyable&gt; ("base", "abstract", no_init); class_&lt;concrete, bases&lt;base&gt; &gt; ("concrete", "concrete"); class_&lt;Test&gt; ("Test", init&lt;boost::shared_ptr&lt;base&gt; &gt;()) </p> <blockquote> <p> .def_readonly ("x", &amp;Test::x, "x") &lt;&lt;&lt;&lt; this seems to trigger the error </p> </blockquote> <p> ; </p> </blockquote> <p> } </p> <p> g++ -o mod/test1.os -c -g -DBOOST_DISABLE_THREADS -O3 -ftree-vectorize -fstrict-aliasing -ffast-math -DNDEBUG -Wall -fPIC -Isrc -I/usr/local/src/boost.hg -I/usr/include/python2.5 mod/test1.cc /usr/local/src/boost.hg/boost/python/to_python_value.hpp: In member function 'const <a class="missing wiki">PyTypeObject</a>* boost::python::detail::shared_ptr_to_python_value&lt;T&gt;::get_pytype() const [with T = boost::shared_ptr&lt;base&gt;&amp;]': /usr/local/src/boost.hg/boost/python/detail/caller.hpp:102: instantiated from 'static const <a class="missing wiki">PyTypeObject</a>* boost::python::detail::converter_target_type&lt;<a class="missing wiki">ResultConverter</a>&gt;::get_pytype() [with <a class="missing wiki">ResultConverter</a> = boost::python::to_python_value&lt;boost::shared_ptr&lt;base&gt;&amp;&gt;]' /usr/local/src/boost.hg/boost/python/detail/caller.hpp:242: instantiated from 'static boost::python::detail::py_func_sig_info boost::python::detail::caller_arity&lt;1u&gt;::impl&lt;F, Policies, Sig&gt;::signature() [with F = boost::python::detail::member&lt;boost::shared_ptr&lt;base&gt;, Test&gt;, Policies = boost::python::return_value_policy&lt;boost::python::return_by_value, boost::python::default_call_policies&gt;, Sig = boost::mpl::vector2&lt;boost::shared_ptr&lt;base&gt;&amp;, Test&amp;&gt;]' /usr/local/src/boost.hg/boost/python/object/py_function.hpp:48: instantiated from 'boost::python::detail::py_func_sig_info boost::python::objects::caller_py_function_impl&lt;Caller&gt;::signature() const [with Caller = boost::python::detail::caller&lt;boost::python::detail::member&lt;boost::shared_ptr&lt;base&gt;, Test&gt;, boost::python::return_value_policy&lt;boost::python::return_by_value, boost::python::default_call_policies&gt;, boost::mpl::vector2&lt;boost::shared_ptr&lt;base&gt;&amp;, Test&amp;&gt; &gt;]' mod/test1.cc:22: instantiated from here /usr/local/src/boost.hg/boost/python/to_python_value.hpp:109: error: no matching function for call to 'boost::python::detail::shared_ptr_to_python_value&lt;boost::shared_ptr&lt;base&gt;&amp;&gt;::get_pytype(boost::type&lt;boost::shared_ptr&lt;base&gt;&amp;&gt;*) const' /usr/local/src/boost.hg/boost/python/to_python_value.hpp:109: note: candidates are: const <a class="missing wiki">PyTypeObject</a>* boost::python::detail::shared_ptr_to_python_value&lt;T&gt;::get_pytype() const [with T = boost::shared_ptr&lt;base&gt;&amp;] scons: <strong>* [mod/test1.os] Error 1 scons: building terminated because of errors. </strong></p> <p> Compilation exited abnormally with code 2 at Wed Sep 12 07:18:15 </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/1246 Trac 1.4.3 Dave Abrahams Wed, 17 Oct 2007 19:37:58 GMT cc set https://svn.boost.org/trac10/ticket/1246#comment:1 https://svn.boost.org/trac10/ticket/1246#comment:1 <ul> <li><strong>cc</strong> <span class="trac-author">rwgk@…</span> added </li> </ul> <p> I think Ralf is responsible for these changes. Ralf, please enter all your settings at <a class="ext-link" href="http://svn.boost.org/trac/boost/settings"><span class="icon">​</span>http://svn.boost.org/trac/boost/settings</a> as described at <a class="wiki" href="https://svn.boost.org/trac10/wiki/WikiStart#GettingaTracSVNUserid">WikiStart#GettingaTracSVNUserid</a> so that tickets can be assigned to you, and reassign this ticket to yourself! </p> Ticket Ralf W. Grosse-Kunstleve <rwgk@…> Wed, 17 Oct 2007 19:53:19 GMT <link>https://svn.boost.org/trac10/ticket/1246#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/1246#comment:2</guid> <description> <p> This is most likely related to Nikolay Mladenov's changes from early September. I just alerted him to this issue. Ralf </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Nikolay Mladenov</dc:creator> <pubDate>Fri, 19 Oct 2007 20:49:52 GMT</pubDate> <title>owner changed https://svn.boost.org/trac10/ticket/1246#comment:3 https://svn.boost.org/trac10/ticket/1246#comment:3 <ul> <li><strong>owner</strong> changed from <span class="trac-author">Dave Abrahams</span> to <span class="trac-author">Nikolay Mladenov</span> </li> </ul> Ticket Nikolay Mladenov Fri, 19 Oct 2007 20:50:43 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/1246#comment:4 https://svn.boost.org/trac10/ticket/1246#comment:4 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> fixed in revision 39223 </p> Ticket