io;posix: implement move constructor for mapped_file
This commit is contained in:
parent
f51beedcdd
commit
26841db5e0
@ -44,6 +44,13 @@ mapped_file::mapped_file (const ::cruft::posix::fd &src, int mflags)
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
mapped_file::mapped_file (cruft::mapped_file &&rhs) noexcept
|
||||
: m_data (std::exchange (rhs.m_data, nullptr))
|
||||
, m_size (std::exchange (rhs.m_size, 0))
|
||||
{ ; }
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
mapped_file::~mapped_file ()
|
||||
{
|
||||
|
@ -45,7 +45,7 @@ namespace cruft {
|
||||
mapped_file (const mapped_file&) = delete;
|
||||
mapped_file& operator= (const mapped_file&) = delete;
|
||||
|
||||
mapped_file (const mapped_file&&) noexcept;
|
||||
mapped_file (mapped_file&&) noexcept;
|
||||
mapped_file& operator= (mapped_file&&) noexcept;
|
||||
|
||||
~mapped_file ();
|
||||
|
Loading…
Reference in New Issue
Block a user