Commit ccc99e41 authored by Matthieu Dorier's avatar Matthieu Dorier

added move-constructor to async_response

parent ef51919d
...@@ -50,6 +50,37 @@ private: ...@@ -50,6 +50,37 @@ private:
public: public:
/**
* @brief Copy constructor is deleted.
*/
async_response(const async_response& other) = delete;
/**
* @brief Move-constructor.
*
* @param other async_response to move from.
*/
async_response(async_response&& other)
: m_request(other.m_request)
, m_engine(other.m_engine)
, m_handle(other.m_handle)
, m_buffer(std::move(other.m_buffer))
, m_ignore_response(other.m_ignore_response) {
other.m_request = MARGO_REQUEST_NULL;
other.m_engine = nullptr;
other.m_handle = HG_HANDLE_NULL;
}
/**
* @brief Copy-assignment operator is deleted.
*/
async_response& operator=(const async_response& other) = delete;
/**
* @brief Move-assignment operator is deleted.
*/
async_response& operator=(async_response&& other) = delete;
/** /**
* @brief Destructor. * @brief Destructor.
*/ */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment