diff options
Diffstat (limited to '3rdparty/asio/include/asio/ip/basic_resolver_results.hpp')
-rw-r--r-- | 3rdparty/asio/include/asio/ip/basic_resolver_results.hpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/3rdparty/asio/include/asio/ip/basic_resolver_results.hpp b/3rdparty/asio/include/asio/ip/basic_resolver_results.hpp index dec2c7e955a..fb7c4149b93 100644 --- a/3rdparty/asio/include/asio/ip/basic_resolver_results.hpp +++ b/3rdparty/asio/include/asio/ip/basic_resolver_results.hpp @@ -2,7 +2,7 @@ // ip/basic_resolver_results.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 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) @@ -62,7 +62,7 @@ public: typedef typename protocol_type::endpoint endpoint_type; /// The type of a value in the results range. - typedef basic_resolver_entry<endpoint_type> value_type; + typedef basic_resolver_entry<protocol_type> value_type; /// The type of a const reference to a value in the range. typedef const value_type& const_reference; @@ -232,19 +232,19 @@ public: /// Get the number of entries in the results range. size_type size() const ASIO_NOEXCEPT { - return this->values_->size(); + return this->values_ ? this->values_->size() : 0; } /// Get the maximum number of entries permitted in a results range. size_type max_size() const ASIO_NOEXCEPT { - return this->values_->max_size(); + return this->values_ ? this->values_->max_size() : values_type().max_size(); } /// Determine whether the results range is empty. bool empty() const ASIO_NOEXCEPT { - return this->values_->empty(); + return this->values_ ? this->values_->empty() : true; } /// Obtain a begin iterator for the results range. @@ -252,7 +252,7 @@ public: { basic_resolver_results tmp(*this); tmp.index_ = 0; - return tmp; + return ASIO_MOVE_CAST(basic_resolver_results)(tmp); } /// Obtain an end iterator for the results range. |