Пожалуйста, прочтите новое правило об ограничении использования AI-инструментов. ×

Блог пользователя Xylenox

Автор Xylenox, история, 5 часов назад, По-английски
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

  • Проголосовать: нравится
  • +85
  • Проголосовать: не нравится

»
5 часов назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится
  • »
    »
    8 минут назад, # ^ |
      Проголосовать: нравится +2 Проголосовать: не нравится

    I didn't know it and am thankful for the blog poster sharing it :O