11 #ifndef ASIO_IP_ADDRESS_V4_RANGE_HPP 12 #define ASIO_IP_ADDRESS_V4_RANGE_HPP 14 #if defined(_MSC_VER) && (_MSC_VER >= 1200) 16 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 18 #include "asio/detail/config.hpp" 19 #include "asio/ip/address_v4_iterator.hpp" 21 #include "asio/detail/push_options.hpp" 49 const iterator& last) ASIO_NOEXCEPT
57 : begin_(other.begin_),
62 #if defined(ASIO_HAS_MOVE) 65 : begin_(ASIO_MOVE_CAST(iterator)(other.begin_)),
66 end_(ASIO_MOVE_CAST(iterator)(other.end_))
69 #endif // defined(ASIO_HAS_MOVE) 75 begin_ = other.begin_;
80 #if defined(ASIO_HAS_MOVE) 85 begin_ = ASIO_MOVE_CAST(iterator)(other.begin_);
86 end_ = ASIO_MOVE_CAST(iterator)(other.end_);
89 #endif // defined(ASIO_HAS_MOVE) 92 iterator
begin() const ASIO_NOEXCEPT
98 iterator
end() const ASIO_NOEXCEPT
110 std::size_t
size() const ASIO_NOEXCEPT
112 return end_->to_uint() - begin_->to_uint();
118 return addr >= *begin_ && addr < *end_ ? iterator(addr) : end_;
132 #include "asio/detail/pop_options.hpp" 134 #endif // ASIO_IP_ADDRESS_V4_RANGE_HPP basic_address_range() ASIO_NOEXCEPT
Construct an empty range.
Definition: address_v4_range.hpp:41
iterator begin() const ASIO_NOEXCEPT
Obtain an iterator that points to the start of the range.
Definition: address_v4_range.hpp:92
Implements IP version 4 style addresses.
Definition: address_v4.hpp:45
basic_address_range & operator=(const basic_address_range &other) ASIO_NOEXCEPT
Assignment operator.
Definition: address_v4_range.hpp:72
An input iterator that can be used for traversing IPv4 addresses.
Definition: address_v4_iterator.hpp:37
Represents a range of IPv4 addresses.
Definition: address_v4_range.hpp:34
iterator end() const ASIO_NOEXCEPT
Obtain an iterator that points to the end of the range.
Definition: address_v4_range.hpp:98
basic_address_range(const basic_address_range &other) ASIO_NOEXCEPT
Copy constructor.
Definition: address_v4_range.hpp:56
bool empty() const ASIO_NOEXCEPT
Determine whether the range is empty.
Definition: address_v4_range.hpp:104
basic_address_range(const iterator &first, const iterator &last) ASIO_NOEXCEPT
Construct an range that represents the given range of addresses.
Definition: address_v4_range.hpp:48
basic_address_iterator< address_v4 > iterator
The type of an iterator that points into the range.
Definition: address_v4_range.hpp:38
std::size_t size() const ASIO_NOEXCEPT
Return the size of the range.
Definition: address_v4_range.hpp:110
Definition: address_v4_range.hpp:26
iterator find(const address_v4 &addr) const ASIO_NOEXCEPT
Find an address in the range.
Definition: address_v4_range.hpp:116
Definition: any_io_executor.hpp:28