Advertisement
Guest User

Untitled

a guest
Jun 18th, 2019
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. template <typename Beg, typename End, typename Sought>
  2. auto find_prefix(const Beg beg,
  3. const End end,
  4. Sought sought)
  5. {
  6. auto low = std::lower_bound(beg, end, sought);
  7. ++sought.back();
  8. auto up = std::lower_bound(beg, end, sought);
  9. return std::make_tuple(low, up);
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement