Boost C++ Libraries: Ticket #3053: asio::placeholders not compatible with std::tr1::bind https://svn.boost.org/trac10/ticket/3053 <p> If I use a placeholder from <code>boost::asio::placeholders</code> with <code>std::tr1::bind</code> from <code>&lt;functional&gt;</code>, I get loads of compiler output, concluding with this: </p> <pre class="wiki">/usr/include/c++/4.3/tr1_impl/functional:1138: error: no match for call to '(std::tr1::_Mem_fn&lt;void (Connection::*)(const boost::system::error_code&amp;)&gt;) (Connection*&amp;, boost::arg&lt;1&gt; (*&amp;)())' /usr/include/c++/4.3/tr1_impl/functional:551: note: candidates are: _Res std::tr1::_Mem_fn&lt;_Res (_Class::*)(_ArgTypes ...)&gt;::operator()(_Class&amp;, _ArgTypes ...) const [with _Res = void, _Class = Connection, _ArgTypes = const boost::system::error_code&amp;] /usr/include/c++/4.3/tr1_impl/functional:556: note: _Res std::tr1::_Mem_fn&lt;_Res (_Class::*)(_ArgTypes ...)&gt;::operator()(_Class*, _ArgTypes ...) const [with _Res = void, _Class = Connection, _ArgTypes = const boost::system::error_code&amp;] /usr/include/c++/4.3/tr1_impl/functional:1138: error: return-statement with a value, in function returning 'void' </pre><p> With <code>Connection</code> a self-defined class. If I use <code>boost::bind</code> instead of <code>std::tr1::bind</code>, it works. </p> <p> To me, this seems like the placeholders from asio are not usable with <code>bind</code> from TR1. Is there any way to fix this in Boost, perhaps using BOOST_HAS_TR1_BIND in the asio headers? </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/3053 Trac 1.4.3 arvid@… Mon, 01 Jun 2009 02:08:49 GMT <link>https://svn.boost.org/trac10/ticket/3053#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3053#comment:1</guid> <description> <p> in my opinion, asio shouldn't have the placeholders in the first place. </p> <p> Asio supports any binding library/mechanism, and it shouldn't add an unnecessary dependency or preference for any particular one. Granted, once bind is part of std:: it makes more sense, but I think the gain is minimal, and the confusion outweighs it. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>chris_kohlhoff</dc:creator> <pubDate>Sat, 27 Jun 2009 08:02:45 GMT</pubDate> <title>type changed https://svn.boost.org/trac10/ticket/3053#comment:2 https://svn.boost.org/trac10/ticket/3053#comment:2 <ul> <li><strong>type</strong> <span class="trac-field-old">Bugs</span> → <span class="trac-field-new">Feature Requests</span> </li> </ul> Ticket chris_kohlhoff Sat, 27 Jun 2009 08:03:06 GMT milestone changed https://svn.boost.org/trac10/ticket/3053#comment:3 https://svn.boost.org/trac10/ticket/3053#comment:3 <ul> <li><strong>milestone</strong> <span class="trac-field-old">Boost 1.40.0</span> → <span class="trac-field-new">To Be Determined</span> </li> </ul> Ticket