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

Автор Firestone, история, 23 месяца назад, По-английски

Don't use for(auto &x: a) for a[N]

Don't use for(auto &x: a) for a[N]

Don't use for(auto &x: a) for a[N]

Don't use for(auto &x: a) for a[N]

Don't use for(auto &x: a) for a[N]

Don't use for(auto &x: a) for a[N]

Don't use for(auto &x: a) for a[N]

Don't use for(auto &x: a) for a[N]

Don't use for(auto &x: a) for a[N]

Don't use for(auto &x: a) for a[N]

Don't use for(auto &x: a) for a[N]

Don't use for(auto &x: a) for a[N]

Don't use for(auto &x: a) for a[N]

Don't use for(auto &x: a) for a[N]

Don't use for(auto &x: a) for a[N]

Don't use for(auto &x: a) for a[N]

Don't use for(auto &x: a) for a[N]

Don't use for(auto &x: a) for a[N]

Don't use for(auto &x: a) for a[N]

Don't use for(auto &x: a) for a[N]

Don't use for(auto &x: a) for a[N]

Don't use for(auto &x: a) for a[N]

Don't use for(auto &x: a) for a[N]

Don't use for(auto &x: a) for a[N]

Don't use for(auto &x: a) for a[N]

Don't use for(auto &x: a) for a[N]

Don't use for(auto &x: a) for a[N]

Don't use for(auto &x: a) for a[N]

Don't use for(auto &x: a) for a[N]

Don't use for(auto &x: a) for a[N]

Don't use for(auto &x: a) for a[N]

Don't use for(auto &x: a) for a[N]

Don't use for(auto &x: a) for a[N]

Don't use for(auto &x: a) for a[N]

Don't use for(auto &x: a) for a[N]

Don't use for(auto &x: a) for a[N]

Don't use for(auto &x: a) for a[N]

Don't use for(auto &x: a) for a[N]

Don't use for(auto &x: a) for a[N]

Don't use for(auto &x: a) for a[N]

Don't use for(auto &x: a) for a[N]

Don't use for(auto &x: a) for a[N]

Don't use for(auto &x: a) for a[N]

Don't use for(auto &x: a) for a[N]

Don't use for(auto &x: a) for a[N]

Don't use for(auto &x: a) for a[N]

Don't use for(auto &x: a) for a[N]

Don't use for(auto &x: a) for a[N]

Don't use for(auto &x: a) for a[N]

Don't use for(auto &x: a) for a[N]

Don't use for(auto &x: a) for a[N]

Don't use for(auto &x: a) for a[N]

Don't use for(auto &x: a) for a[N]

Don't use for(auto &x: a) for a[N]

Don't use for(auto &x: a) for a[N]

Don't use for(auto &x: a) for a[N]

Don't use for(auto &x: a) for a[N]

Don't use for(auto &x: a) for a[N]

Don't use for(auto &x: a) for a[N]

Don't use for(auto &x: a) for a[N]

Don't use for(auto &x: a) for a[N]

Don't use for(auto &x: a) for a[N]

Don't use for(auto &x: a) for a[N]

Don't use for(auto &x: a) for a[N]

Don't use for(auto &x: a) for a[N]

Don't use for(auto &x: a) for a[N]

Don't use for(auto &x: a) for a[N]

Don't use for(auto &x: a) for a[N]

Don't use for(auto &x: a) for a[N]

Don't use for(auto &x: a) for a[N]

Don't use for(auto &x: a) for a[N]

Don't use for(auto &x: a) for a[N]

Don't use for(auto &x: a) for a[N]

Don't use for(auto &x: a) for a[N]

Don't use for(auto &x: a) for a[N]

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

»
23 месяца назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

And what's wrong with that usage (another from using variable length array if N is variable)?

»
23 месяца назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Why?

»
23 месяца назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Programming shouldn't devolve into a collection of "don't"s.

Rather, do understand the constructs you use, and you'll be fine.