Deduce EndpointSequence iterator type.

This commit is contained in:
Christopher Kohlhoff 2019-02-28 12:19:40 +11:00
parent bc7e0f38cf
commit 536df5fd74

View File

@ -333,10 +333,18 @@ namespace detail
void operator()(asio::error_code ec, int start = 0)
{
typename EndpointSequence::const_iterator begin = endpoints_.begin();
typename EndpointSequence::const_iterator iter = begin;
this->process(ec, start,
const_cast<const EndpointSequence&>(endpoints_).begin(),
const_cast<const EndpointSequence&>(endpoints_).end());
}
//private:
template <typename Iterator>
void process(asio::error_code ec,
int start, Iterator begin, Iterator end)
{
Iterator iter = begin;
std::advance(iter, index_);
typename EndpointSequence::const_iterator end = endpoints_.end();
switch (start_ = start)
{
@ -387,7 +395,6 @@ namespace detail
}
}
//private:
basic_socket<Protocol, Executor>& socket_;
EndpointSequence endpoints_;
std::size_t index_;