Boost C++ Libraries: Ticket #9250: ext/boost/bind/bind.hpp" line 70: Error: boost::_bi::F is not a namespace or class name https://svn.boost.org/trac10/ticket/9250 <p> Whilst compiling Phusion Passenger which is including the Boost 1.52 header files. </p> <p> OS: Solaris 10 SPARC Compiler: Sun Studio 12.3 </p> <pre class="wiki">"ext/boost/bind/bind.hpp", line 70: Error: boost::_bi::F is not a namespace or class name. "ext/boost/bind/bind_template.hpp", line 15: Where: While specializing "boost::_bi::result_traits&lt;boost::_bi::unspecified, extern "C" int(*)(DIR*)&gt;". "ext/boost/bind/bind_template.hpp", line 15: Where: Specialized in boost::_bi::bind_t&lt;boost::_bi::unspecified, extern "C" int(*)(DIR*), boost::_bi::list1&lt;boost::_bi::value&lt;DIR*&gt;&gt;&gt;. "ext/common/ApplicationPool2/Spawner.h", line 250: Where: Specialized in non-template code. "ext/boost/bind/bind.hpp", line 70: Error: result_type is not defined. "ext/boost/bind/bind_template.hpp", line 15: Where: While specializing "boost::_bi::result_traits&lt;boost::_bi::unspecified, extern "C" int(*)(DIR*)&gt;". "ext/boost/bind/bind_template.hpp", line 15: Where: Specialized in boost::_bi::bind_t&lt;boost::_bi::unspecified, extern "C" int(*)(DIR*), boost::_bi::list1&lt;boost::_bi::value&lt;DIR*&gt;&gt;&gt;. </pre><p> The code from bind.hpp: </p> <pre class="wiki"> 66 struct unspecified {}; 67 68 template&lt;class F&gt; 69 struct result_traits&lt;unspecified, F&gt; { 70 typedef typename F::result_type type; 71 }; 72 73 template&lt;class F&gt; 74 struct result_traits&lt;unspecified, reference_wrapper&lt;F&gt; &gt; { 75 typedef typename F::result_type type; 76 }; </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/9250 Trac 1.4.3 Peter Dimov Tue, 15 Oct 2013 13:28:46 GMT <link>https://svn.boost.org/trac10/ticket/9250#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9250#comment:1</guid> <description> <p> "ext/common/ApplicationPool2/Spawner.h", line 250 should contain something like <code>boost::bind(closedir, ...)</code>. It needs to be changed to <code>boost::bind&lt;int&gt;(closedir, ...)</code>. The problem is that on this compiler extern "C" functions are distinct from ordinary C++ functions. </p> <p> <a href="http://www.boost.org/doc/libs/1_54_0/libs/bind/bind.html#Q_extern_C">http://www.boost.org/doc/libs/1_54_0/libs/bind/bind.html#Q_extern_C</a> </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Wed, 16 Oct 2013 00:40:26 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/9250#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9250#comment:2</guid> <description> <p> Thanks, that '&lt;int&gt;' seems to have fixed this issue. I'll pass on the diff. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Peter Dimov</dc:creator> <pubDate>Wed, 11 Dec 2013 17:33:18 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/9250#comment:3 https://svn.boost.org/trac10/ticket/9250#comment:3 <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> Ticket