Opened 6 years ago

Closed 6 years ago

#7210 closed enhancement (fixed)

API: STL compatible iterators

Reported by: blarg Owned by: blarg
Priority: normal Milestone: 2.3.0
Component: default Version: svn-trunk
Severity: normal Keywords: api
Cc: antonio

Description

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.

Change History (3)

comment:1 by Even Rouault, 6 years ago

Keywords: api added
Summary: STL compatible iteratorsAPI: STL compatible iterators

comment:2 by antonio, 6 years ago

Cc: antonio added

comment:3 by Even Rouault, 6 years ago

Milestone: 2.3.0
Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.