[Boost-bugs] [Boost C++ Libraries] #7556: mode BOOST_ASIO_HAS_MOVE - post(rvalue)

Subject: [Boost-bugs] [Boost C++ Libraries] #7556: mode BOOST_ASIO_HAS_MOVE - post(rvalue)
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-10-23 11:39:56


#7556: mode BOOST_ASIO_HAS_MOVE - post(rvalue)
------------------------------------------------+---------------------------
 Reporter: shirshov evgeny <381677383@…> | Owner: chris_kohlhoff
     Type: Patches | Status: new
Milestone: To Be Determined | Component: asio
  Version: Boost Release Branch | Severity: Problem
 Keywords: asio |
------------------------------------------------+---------------------------
 // use compiler : MSVC 10
 {{{
 #define BOOST_ASIO_HAS_MOVE
 // work around problem rvalue with BOOST_ASIO_COMPLETION_HANDLER_CHECK()
 #define BOOST_ASIO_DISABLE_HANDLER_TYPE_REQUIREMENTS

 struct test
 {
 private:
     test(test const&);
 public:
     test();
     test(test &&);
     void operator()();
 };


 void main()
 {
    using namespace boost::asio;
    io_service io;
    io.post(test());
 }
 }}}

 compile error C2248 : "..use private member test(test const&)..."

 problems :
 file : boost/asio/handler_invoke_hook.hpp
 {{{
 template <typename Function>
 inline void asio_handler_invoke(Function function, ...)
 {
   function();
 }
 }}}

 correct:
 {{{
 template <typename Function>
 inline void asio_handler_invoke(Function & function, ...)
 {
   function();
 }
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/7556>
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:11 UTC