BlackToppStudios / Mezz_Foundation

Foundational Data types that enforce no opinions on how to build games and provide many facilities that complex games need. This largely avoids graphics and physics, but provides tools like the SortedVector, CountedPtr and HashedString classes.
GNU General Public License v3.0
3 stars 0 forks source link

Add support for non-const ranges to functional functors and drains. #76

Open Sqeaky opened 4 years ago

Sqeaky commented 4 years ago

Currently all the functors and drains check that ranges use cend and cbegin and check for these. This is a reasonable default because these are guaranteed to be const. Most containers provide a const and non-const version of begin and end, and the Functors and Drains should be able to use those, but presently just static assert for the c versions. These should both be checked and should use whichever is available.