Mark posix descriptor classes' move constructors as noexcept.

This commit is contained in:
Christopher Kohlhoff 2020-04-06 18:42:39 +10:00
parent 8dc44bc23b
commit 992a656e26
4 changed files with 4 additions and 3 deletions

View File

@ -51,6 +51,7 @@ void reactive_descriptor_service::construct(
void reactive_descriptor_service::move_construct(
reactive_descriptor_service::implementation_type& impl,
reactive_descriptor_service::implementation_type& other_impl)
ASIO_NOEXCEPT
{
impl.descriptor_ = other_impl.descriptor_;
other_impl.descriptor_ = -1;

View File

@ -85,7 +85,7 @@ public:
// Move-construct a new descriptor implementation.
ASIO_DECL void move_construct(implementation_type& impl,
implementation_type& other_impl);
implementation_type& other_impl) ASIO_NOEXCEPT;
// Move-assign from another descriptor implementation.
ASIO_DECL void move_assign(implementation_type& impl,

View File

@ -168,7 +168,7 @@ public:
* constructed using the @c basic_descriptor(const executor_type&)
* constructor.
*/
basic_descriptor(basic_descriptor&& other)
basic_descriptor(basic_descriptor&& other) ASIO_NOEXCEPT
: impl_(std::move(other.impl_))
{
}

View File

@ -144,7 +144,7 @@ public:
* constructed using the @c basic_stream_descriptor(const executor_type&)
* constructor.
*/
basic_stream_descriptor(basic_stream_descriptor&& other)
basic_stream_descriptor(basic_stream_descriptor&& other) ASIO_NOEXCEPT
: descriptor(std::move(other))
{
}