diff options
Diffstat (limited to '3rdparty/asio/include/asio/ip/address_v6_range.hpp')
-rw-r--r-- | 3rdparty/asio/include/asio/ip/address_v6_range.hpp | 35 |
1 files changed, 15 insertions, 20 deletions
diff --git a/3rdparty/asio/include/asio/ip/address_v6_range.hpp b/3rdparty/asio/include/asio/ip/address_v6_range.hpp index 4dc7a30e06c..7f89773383d 100644 --- a/3rdparty/asio/include/asio/ip/address_v6_range.hpp +++ b/3rdparty/asio/include/asio/ip/address_v6_range.hpp @@ -2,7 +2,7 @@ // ip/address_v6_range.hpp // ~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) // Oliver Kowalke (oliver dot kowalke at gmail dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying @@ -39,7 +39,7 @@ public: typedef basic_address_iterator<address_v6> iterator; /// Construct an empty range. - basic_address_range() ASIO_NOEXCEPT + basic_address_range() noexcept : begin_(address_v6()), end_(address_v6()) { @@ -47,68 +47,63 @@ public: /// Construct an range that represents the given range of addresses. explicit basic_address_range(const iterator& first, - const iterator& last) ASIO_NOEXCEPT + const iterator& last) noexcept : begin_(first), end_(last) { } /// Copy constructor. - basic_address_range(const basic_address_range& other) ASIO_NOEXCEPT + basic_address_range(const basic_address_range& other) noexcept : begin_(other.begin_), end_(other.end_) { } -#if defined(ASIO_HAS_MOVE) /// Move constructor. - basic_address_range(basic_address_range&& other) ASIO_NOEXCEPT - : begin_(ASIO_MOVE_CAST(iterator)(other.begin_)), - end_(ASIO_MOVE_CAST(iterator)(other.end_)) + basic_address_range(basic_address_range&& other) noexcept + : begin_(static_cast<iterator&&>(other.begin_)), + end_(static_cast<iterator&&>(other.end_)) { } -#endif // defined(ASIO_HAS_MOVE) /// Assignment operator. basic_address_range& operator=( - const basic_address_range& other) ASIO_NOEXCEPT + const basic_address_range& other) noexcept { begin_ = other.begin_; end_ = other.end_; return *this; } -#if defined(ASIO_HAS_MOVE) /// Move assignment operator. - basic_address_range& operator=( - basic_address_range&& other) ASIO_NOEXCEPT + basic_address_range& operator=(basic_address_range&& other) noexcept { - begin_ = ASIO_MOVE_CAST(iterator)(other.begin_); - end_ = ASIO_MOVE_CAST(iterator)(other.end_); + begin_ = static_cast<iterator&&>(other.begin_); + end_ = static_cast<iterator&&>(other.end_); return *this; } -#endif // defined(ASIO_HAS_MOVE) /// Obtain an iterator that points to the start of the range. - iterator begin() const ASIO_NOEXCEPT + iterator begin() const noexcept { return begin_; } /// Obtain an iterator that points to the end of the range. - iterator end() const ASIO_NOEXCEPT + iterator end() const noexcept { return end_; } /// Determine whether the range is empty. - bool empty() const ASIO_NOEXCEPT + bool empty() const noexcept { return begin_ == end_; } /// Find an address in the range. - iterator find(const address_v6& addr) const ASIO_NOEXCEPT + iterator find(const address_v6& addr) const noexcept { return addr >= *begin_ && addr < *end_ ? iterator(addr) : end_; } |