/usr/include/boost/asio/ip
NameSizeModeActions
detail/-0755rm
impl/-0755rm
address.hpp83130644editdlrm
address_v4.hpp100940644editdlrm
address_v4_iterator.hpp42600644editdlrm
address_v4_range.hpp33920644editdlrm
address_v6.hpp105690644editdlrm
address_v6_iterator.hpp46020644editdlrm
address_v6_range.hpp33350644editdlrm
bad_address_cast.hpp13170644editdlrm
basic_endpoint.hpp74540644editdlrm
basic_resolver.hpp449490644editdlrm
basic_resolver_entry.hpp30200644editdlrm
basic_resolver_iterator.hpp51540644editdlrm
basic_resolver_query.hpp93560644editdlrm
basic_resolver_results.hpp97490644editdlrm
host_name.hpp11060644editdlrm
icmp.hpp28650644editdlrm
multicast.hpp54960644editdlrm
network_v4.hpp72830644editdlrm
network_v6.hpp65000644editdlrm
resolver_base.hpp37720644editdlrm
resolver_query_base.hpp11690644editdlrm
tcp.hpp39280644editdlrm
udp.hpp26600644editdlrm
unicast.hpp17850644editdlrm
v6_only.hpp18090644editdlrm
Edit: /usr/include/boost/asio/ip/address_v4_range.hpp (3392B)
// // ip/address_v4_range.hpp // ~~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #ifndef BOOST_ASIO_IP_ADDRESS_V4_RANGE_HPP #define BOOST_ASIO_IP_ADDRESS_V4_RANGE_HPP #if defined(_MSC_VER) && (_MSC_VER >= 1200) # pragma once #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) #include #include #include namespace boost { namespace asio { namespace ip { template class basic_address_range; /// Represents a range of IPv4 addresses. /** * @par Thread Safety * @e Distinct @e objects: Safe.@n * @e Shared @e objects: Unsafe. */ template <> class basic_address_range { public: /// The type of an iterator that points into the range. typedef basic_address_iterator iterator; /// Construct an empty range. basic_address_range() BOOST_ASIO_NOEXCEPT : begin_(address_v4()), end_(address_v4()) { } /// Construct an range that represents the given range of addresses. explicit basic_address_range(const iterator& first, const iterator& last) BOOST_ASIO_NOEXCEPT : begin_(first), end_(last) { } /// Copy constructor. basic_address_range(const basic_address_range& other) BOOST_ASIO_NOEXCEPT : begin_(other.begin_), end_(other.end_) { } #if defined(BOOST_ASIO_HAS_MOVE) /// Move constructor. basic_address_range(basic_address_range&& other) BOOST_ASIO_NOEXCEPT : begin_(BOOST_ASIO_MOVE_CAST(iterator)(other.begin_)), end_(BOOST_ASIO_MOVE_CAST(iterator)(other.end_)) { } #endif // defined(BOOST_ASIO_HAS_MOVE) /// Assignment operator. basic_address_range& operator=( const basic_address_range& other) BOOST_ASIO_NOEXCEPT { begin_ = other.begin_; end_ = other.end_; return *this; } #if defined(BOOST_ASIO_HAS_MOVE) /// Move assignment operator. basic_address_range& operator=( basic_address_range&& other) BOOST_ASIO_NOEXCEPT { begin_ = BOOST_ASIO_MOVE_CAST(iterator)(other.begin_); end_ = BOOST_ASIO_MOVE_CAST(iterator)(other.end_); return *this; } #endif // defined(BOOST_ASIO_HAS_MOVE) /// Obtain an iterator that points to the start of the range. iterator begin() const BOOST_ASIO_NOEXCEPT { return begin_; } /// Obtain an iterator that points to the end of the range. iterator end() const BOOST_ASIO_NOEXCEPT { return end_; } /// Determine whether the range is empty. bool empty() const BOOST_ASIO_NOEXCEPT { return size() == 0; } /// Return the size of the range. std::size_t size() const BOOST_ASIO_NOEXCEPT { return end_->to_uint() - begin_->to_uint(); } /// Find an address in the range. iterator find(const address_v4& addr) const BOOST_ASIO_NOEXCEPT { return addr >= *begin_ && addr < *end_ ? iterator(addr) : end_; } private: iterator begin_; iterator end_; }; /// Represents a range of IPv4 addresses. typedef basic_address_range address_v4_range; } // namespace ip } // namespace asio } // namespace boost #include #endif // BOOST_ASIO_IP_ADDRESS_V4_RANGE_HPP