diff --git a/include/boost/asio/local/basic_endpoint.hpp b/include/boost/asio/local/basic_endpoint.hpp index 366fd129ba..3c2b8af0cf 100644 --- a/include/boost/asio/local/basic_endpoint.hpp +++ b/include/boost/asio/local/basic_endpoint.hpp @@ -86,26 +86,26 @@ class basic_endpoint #endif // defined(BOOST_ASIO_HAS_STRING_VIEW) /// Copy constructor. - basic_endpoint(const basic_endpoint& other) + basic_endpoint(const basic_endpoint& other) noexcept : impl_(other.impl_) { } /// Move constructor. - basic_endpoint(basic_endpoint&& other) + basic_endpoint(basic_endpoint&& other) noexcept : impl_(other.impl_) { } /// Assign from another endpoint. - basic_endpoint& operator=(const basic_endpoint& other) + basic_endpoint& operator=(const basic_endpoint& other) noexcept { impl_ = other.impl_; return *this; } /// Move-assign from another endpoint. - basic_endpoint& operator=(basic_endpoint&& other) + basic_endpoint& operator=(basic_endpoint&& other) noexcept { impl_ = other.impl_; return *this; diff --git a/include/boost/asio/local/detail/endpoint.hpp b/include/boost/asio/local/detail/endpoint.hpp index f92518b697..6c331ccd08 100644 --- a/include/boost/asio/local/detail/endpoint.hpp +++ b/include/boost/asio/local/detail/endpoint.hpp @@ -37,7 +37,7 @@ class endpoint { public: // Default constructor. - BOOST_ASIO_DECL endpoint(); + BOOST_ASIO_DECL endpoint() noexcept; // Construct an endpoint using the specified path name. BOOST_ASIO_DECL endpoint(const char* path_name); @@ -51,14 +51,14 @@ class endpoint #endif // defined(BOOST_ASIO_HAS_STRING_VIEW) // Copy constructor. - endpoint(const endpoint& other) + endpoint(const endpoint& other) noexcept : data_(other.data_), path_length_(other.path_length_) { } // Assign from another endpoint. - endpoint& operator=(const endpoint& other) + endpoint& operator=(const endpoint& other) noexcept { data_ = other.data_; path_length_ = other.path_length_; diff --git a/include/boost/asio/local/detail/impl/endpoint.ipp b/include/boost/asio/local/detail/impl/endpoint.ipp index 812e7d3e5e..3423a0e9a5 100644 --- a/include/boost/asio/local/detail/impl/endpoint.ipp +++ b/include/boost/asio/local/detail/impl/endpoint.ipp @@ -33,7 +33,7 @@ namespace asio { namespace local { namespace detail { -endpoint::endpoint() +endpoint::endpoint() noexcept { init("", 0); }