marcdirven / cpp-lazy Goto Github PK
View Code? Open in Web Editor NEWC++11/14/17/20 library for lazy evaluation
License: MIT License
C++11/14/17/20 library for lazy evaluation
License: MIT License
Right now the CI workflow only runs on Ubuntu and whatever default compiler it comes set up with.
I'd like to get some feedback on what are desirable compilers and what version(s) of them would you like to have running in CI?
Also, if the CI workflow will be extended to many OSs and compiler versions, I believe that only a single job should be dedicated to running tests with the default compiler, where the library is installed and imported using find_package
.
Does cpp-lazy support gcc5?
I met compilation error in gcc 5.4.0:
In file included from xxx/include/Lz/Map.hpp:6:0,
xxx/include/Lz/detail/BasicIteratorView.hpp:642:34: error: expected type-specifier before ‘MAKE_BIN_OP’
class BinaryPredicate = MAKE_BIN_OP(std::equal_to, internal::ValueTypeIterable<IterableA>)>
^
xxx/include/Lz/detail/BasicIteratorView.hpp:642:34: error: expected ‘>’ before ‘MAKE_BIN_OP’
I already confirmed cpp-lazy works fine gcc 6.4.0 or later.
Create a wrapper function for toMap
and toUnorderedMap
so that when one has to specify for e.g. the Hasher
template parameter, one does not also has to specify the Key
template parameter as well, since that can be deduced automatically by using decltype(std::declval<Func>())
.
Currently the iterator_tag
is always random_acces
but should be one of the containers' iterator tags. The zip function however does work fine but functionality that requires std::random_acces_iterator
while the underlying container is not, then the program will not compile. This only applies to the following STL containers:
std::list
and std::forward_list
std::map
and its equivalentsstd::queue
and its equivalentsstd::set
and its equivalentsOne can still iterate over these containers using the lz::zip
function, but one cannot use the following operators on the iterator itself:
operator>, <, <=, >=
The concat iterator only accepts two arguments: a
and b
. This can be increased by using a parameter pack.
Example:
vector a = {1, 2, 3, 4, 5};
vector b = {1, 2, 3, 4, 5};
vector c = {1, 2, 3, 4, 5};
for (int i : lz::concat(a, b, c)) {}
instead of:
vector a = {1, 2, 3, 4, 5};
vector b = {1, 2, 3, 4, 5};
vector c = {1, 2, 3, 4, 5};
for (int i : lz::concat(lz::concat(a, b), c)) {}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.