News for hackers. Stuff that matters.
Re:My Delorean runs Perl by electricslpnsld on Saturday January 27, 2018 @04:48PM (#16248261)
If you use std::begin and std::end instead of the member functions this will even work with old-school C-style arrays.
Re:My Delorean runs Perl by emmelaich on Saturday January 27, 2018 @07:36PM (#16248971)
.. and Herb Sutter recommends those free functions over the member functions for this reason -- genericity.
Re:My Delorean runs Perl by emmelaich on Saturday January 27, 2018 @07:35PM (#16248967)
Yes, and you can even use the range syntax instead of begin/end.

Here's a file with a few different ways

https://gist.github.com/anonymous/78b4f257e60d55537b36e2e4f3...