#1683 Some improvements for IteratorRange
Metadata
Property | Value |
---|---|
Reported by | Steffen Müthing (steffen.muething@iwr.uni-heidelberg.de) |
Reported at | Jul 2, 2015 10:04 |
Type | Feature Request |
Version | Git (pre2.4) [cmake] |
Operating System | Unspecified / All |
Last edited by | Steffen Müthing (steffen.muething@iwr.uni-heidelberg.de) |
Last edited at | Jul 3, 2015 14:17 |
Closed by | Steffen Müthing (steffen.muething@iwr.uni-heidelberg.de) |
Closed at | Jul 3, 2015 14:17 |
Closed in version | 2.4 |
Resolution | Implemented |
Comment | Merged to master (7240489). |
Carsten, can you please cherry-pick this change to the release branch? |
Description
The IteratorRange in dune-common is a nice utility, but I've stumbled across two problems trying to use it in more places:
- You can't store a list of them (because they are neither default-constructible nor copyable)
- They can be problematic if a user expects a const iterator and accordingly tries to extract the const_iterator typedef. This could be fixed by having a separate ConstIteratorRange that inherits from InteratorRange and provides the additional typedef.
I'd really like to fix those two issues before 2.4, but I wanted to ask if there are any objections (in particular about making the ranges copyable).