Please read the new rule regarding the restriction on the use of AI tools. ×

Xylenox's blog

By Xylenox, history, 2 hours ago, In English
auto res = *ranges::partition_point(views::iota(lo, hi), check);

this returns the first $$$x$$$ in the range $$$[lo, hi)$$$ such that check(x) is not true, or $$$hi$$$ if it doesn't exist. Be careful to make sure the $$$lo$$$ and $$$hi$$$ are both integers of the same type, otherwise there is weird behavior.

example usage: 284450329

  • Vote: I like it
  • +43
  • Vote: I do not like it

»
76 minutes ago, # |
  Vote: I like it +4 Vote: I do not like it