[Boost-bugs] [Boost C++ Libraries] #3053: asio::placeholders not compatible with std::tr1::bind

Subject: [Boost-bugs] [Boost C++ Libraries] #3053: asio::placeholders not compatible with std::tr1::bind
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2009-05-20 09:18:10


#3053: asio::placeholders not compatible with std::tr1::bind
-------------------------------+--------------------------------------------
 Reporter: sdrongel_at_[hidden] | Owner: chris_kohlhoff
     Type: Bugs | Status: new
Milestone: Boost 1.40.0 | Component: asio
  Version: Boost 1.38.0 | Severity: Cosmetic
 Keywords: |
-------------------------------+--------------------------------------------
 If I use a placeholder from `boost::asio::placeholders` with
 `std::tr1::bind` from `<functional>`, I get loads of compiler output,
 concluding with this:
 {{{
 /usr/include/c++/4.3/tr1_impl/functional:1138: error: no match for call to
 '(std::tr1::_Mem_fn<void (Connection::*)(const
 boost::system::error_code&)>) (Connection*&, boost::arg<1> (*&)())'
 /usr/include/c++/4.3/tr1_impl/functional:551: note: candidates are: _Res
 std::tr1::_Mem_fn<_Res (_Class::*)(_ArgTypes ...)>::operator()(_Class&,
 _ArgTypes ...) const [with _Res = void, _Class = Connection, _ArgTypes =
 const boost::system::error_code&]
 /usr/include/c++/4.3/tr1_impl/functional:556: note: _Res
 std::tr1::_Mem_fn<_Res (_Class::*)(_ArgTypes ...)>::operator()(_Class*,
 _ArgTypes ...) const [with _Res = void, _Class = Connection, _ArgTypes =
 const boost::system::error_code&]
 /usr/include/c++/4.3/tr1_impl/functional:1138: error: return-statement
 with a value, in function returning 'void'
 }}}
 With `Connection` a self-defined class. If I use `boost::bind` instead of
 `std::tr1::bind`, it works.

 To me, this seems like the placeholders from asio are not usable with
 `bind` from TR1. Is there any way to fix this in Boost, perhaps using
 BOOST_HAS_TR1_BIND in the asio headers?

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/3053>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:00 UTC