Boost logo

Boost :

Subject: [boost] interprocess: error in boost::interprocess::file_lock::swap
From: Anton Ivanov (ai_at_[hidden])
Date: 2009-02-17 08:41:11


Hi!

current code of function boost::interprocess::file_lock::swap (in boost
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
https://svn.boost.org/trac/boost/ticket/2766
created.

-- 
Yours sincerely,
Anton Ivanov (ai_at_[hidden])

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk