MCPcopy Create free account
hub / github.com/boostorg/asio / match_char

Class match_char

test/read_until.cpp:456–474  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

454}
455
456class match_char
457{
458public:
459 explicit match_char(char c) : c_(c) {}
460
461 template <typename Iterator>
462 std::pair<Iterator, bool> operator()(
463 Iterator begin, Iterator end) const
464 {
465 Iterator i = begin;
466 while (i != end)
467 if (c_ == *i++)
468 return std::make_pair(i, true);
469 return std::make_pair(i, false);
470 }
471
472private:
473 char c_;
474};
475
476namespace boost {
477namespace asio {

Calls

no outgoing calls