[Boost-bugs] [Boost C++ Libraries] #2766: interprocess: error in boost::interprocess::file_lock::swap

Subject: [Boost-bugs] [Boost C++ Libraries] #2766: interprocess: error in boost::interprocess::file_lock::swap
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2009-02-17 13:34:13


#2766: interprocess: error in boost::interprocess::file_lock::swap
------------------------------------------+---------------------------------
 Reporter: Anton Ivanov <ai81_at_[hidden]> | Owner: igaztanaga
     Type: Bugs | Status: new
Milestone: Boost 1.39.0 | Component: interprocess
  Version: Boost 1.38.0 | Severity: Problem
 Keywords: |
------------------------------------------+---------------------------------
 current code (1.38.0) is:

    #if !defined(BOOST_INTERPROCESS_RVALUE_REFERENCE) &&
 !defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED)
    void swap(detail::moved_object<file_lock> mother)
    { this->swap(mother.get()); }
    void swap(file_lock &other)
    #else
    void swap(file_lock &&other)
    #endif
    {
       file_handle_t tmp = m_file_hnd;
       other.m_file_hnd = other.m_file_hnd;
       other.m_file_hnd = tmp;
    }

 Seems, line:
 other.m_file_hnd = other.m_file_hnd;
 is wrong. Right version:
 m_file_hnd = other.m_file_hnd;

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