Slacker News Slacker News logo featuring a lazy sloth with a folded newspaper hat
  • top
  • new
  • show
  • ask
  • jobs
Library

Comment by my-next-account

1 day ago

Implementing STL iterators are a bloody PITA

1 comment

my-next-account

Reply

flohofwoe  1 day ago

You don't need iterators for the range-based for loop, just a .begin() and .end() method which returns a raw pointer is enough.

E.g.:

https://github.com/floooh/oryol/blob/eb08cffe1b1cb6b05ed14ec...

(don't use that project though because it's been archived, I've switched back to plain old C in the meantime)

Slacker News

Product

  • API Reference
  • Hacker News RSS
  • Source on GitHub

Community

  • Support Ukraine
  • Equal Justice Initiative
  • GiveWell Charities