How to make my custom type to work with “range-based for loops”?
The standard has been changed since the question (and most answers) were posted in the resolution of this defect report. The way to make a for(:) loop work on your type X is now one of two ways: Create member X::begin() and X::end() that return something that acts like an iterator Create a free function … Read more