Adding range-v3 dependencies ?
Posted: 09 Sep 2017, 18:17
Range-v3 is a header only libraries that adds range types to C++.
A range is a structure that holds a begin and end iterator from a collection like std::vector or list.
The benefit of using ranges over iterator is that you can compose ranges and thus refactor code much more easier and improve readability.
Since range-v3 only has a view on iterator, every range operation modifies iterator instead of creating a new collection (it's what is referred as "lazy range combinator", using metaprogramming iterator operation are collapsed into a single iterator type) which means it doesn't add overhead.
It's often referred as "STL 2.0" given it could completly change how container are used in C++.
So far it's supported by every C++14 compiler out there (including MSVC) and will be part of ISO C++2020.
Some example can be found here https://ericniebler.github.io/range-v3/ ... uick-start
Is it ok to add it to warzone 2100 ?
A range is a structure that holds a begin and end iterator from a collection like std::vector or list.
The benefit of using ranges over iterator is that you can compose ranges and thus refactor code much more easier and improve readability.
Since range-v3 only has a view on iterator, every range operation modifies iterator instead of creating a new collection (it's what is referred as "lazy range combinator", using metaprogramming iterator operation are collapsed into a single iterator type) which means it doesn't add overhead.
It's often referred as "STL 2.0" given it could completly change how container are used in C++.
So far it's supported by every C++14 compiler out there (including MSVC) and will be part of ISO C++2020.
Some example can be found here https://ericniebler.github.io/range-v3/ ... uick-start
Is it ok to add it to warzone 2100 ?