Deduce EndpointSequence iterator type.
This commit is contained in:
parent
bc7e0f38cf
commit
536df5fd74
@ -333,10 +333,18 @@ namespace detail
|
|||||||
|
|
||||||
void operator()(asio::error_code ec, int start = 0)
|
void operator()(asio::error_code ec, int start = 0)
|
||||||
{
|
{
|
||||||
typename EndpointSequence::const_iterator begin = endpoints_.begin();
|
this->process(ec, start,
|
||||||
typename EndpointSequence::const_iterator iter = begin;
|
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_);
|
std::advance(iter, index_);
|
||||||
typename EndpointSequence::const_iterator end = endpoints_.end();
|
|
||||||
|
|
||||||
switch (start_ = start)
|
switch (start_ = start)
|
||||||
{
|
{
|
||||||
@ -387,7 +395,6 @@ namespace detail
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//private:
|
|
||||||
basic_socket<Protocol, Executor>& socket_;
|
basic_socket<Protocol, Executor>& socket_;
|
||||||
EndpointSequence endpoints_;
|
EndpointSequence endpoints_;
|
||||||
std::size_t index_;
|
std::size_t index_;
|
||||||
|
Loading…
Reference in New Issue
Block a user