API: STL compatible iterators
|Reported by:||blarg||Owned by:||blarg|
In some cases, such as this http://www.gdal.org/classGDALDataset.html#ac71c86b48ecb54fc2c1a844ee1ca33e7 , the GDAL API supports iteration over collections of entities. However, the iteration mechanism is not compatible with STL iterators - it is a custom API, unique to GDAL.
This is unfortunate; it requires the developer to learn an additional iteration API, it prevents use of standard STL functionality such as std::for_each (without writing cumbersome adapter layers), and it prevents use of newer language features such as C++ 11's range-based for loop.
From my investigation so far, it would only be moderately difficult to create STL-compatible iterator APIs that would solve the above problems and consequently feel much more natural to C++ developers.