rollbear / lift Goto Github PK
View Code? Open in Web Editor NEWconstexpr C++17 library for simplifying higher order functions in application code
License: Boost Software License 1.0
constexpr C++17 library for simplifying higher order functions in application code
License: Boost Software License 1.0
Would it be possible to create a versioned release of the code as-is? It would make it much simpler for us stock in the corporate world who have to track our dependencies carefully
If I try to compile tests, GCC gives me this output:
[rbrugo@rbrugo ~/git/lift/build] (master) $ cmake .. && cmake --build .
-- The C compiler identification is GNU 9.2.0
-- The CXX compiler identification is GNU 9.2.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /home/rbrugo/git/lift/build
Scanning dependencies of target self_test
[ 33%] Building CXX object test/CMakeFiles/self_test.dir/tests.cpp.o
/home/rbrugo/git/lift/test/tests.cpp:40:37: error: non-constant condition for static assertion
39 | static_assert(lift::when_none(eq<3>,
| ~~~~~~~~~~~~~~~~~~~~~~
40 | eq<4>)(5),
| ~~~~~~^~~
/home/rbrugo/git/lift/test/tests.cpp:41:40: in ‘constexpr’ expansion of ‘lift::when_none(Fs&& ...) [with Fs = {const lift::equal(T&&) [with T = int]::<lambda(const auto:3&)>&, const lift::equal(T&&) [with T = int]::<lambda(const auto:3&)>&}](eq<4>)’
/home/rbrugo/git/lift/test/tests.cpp:41:40: in ‘constexpr’ expansion of ‘lift::negate(F&&) [with F = lift::when_any(Fs&& ...) [with Fs = {const lift::equal(T&&) [with T = int]::<lambda(const auto:3&)>&, const lift::equal(T&&) [with T = int]::<lambda(const auto:3&)>&}]::<lambda(const auto:10& ...)>]()’
/home/rbrugo/git/lift/test/tests.cpp:40:37: error: call to non-‘constexpr’ function ‘lift::when_any(Fs&& ...) [with Fs = {const lift::equal(T&&) [with T = int]::<lambda(const auto:3&)>&, const lift::equal(T&&) [with T = int]::<lambda(const auto:3&)>&}]::<lambda(const auto:10& ...)>::<lambda>(lift::when_any(Fs&& ...) [with Fs = {const lift::equal(T&&) [with T = int]::<lambda(const auto:3&)>&, const lift::equal(T&&) [with T = int]::<lambda(const auto:3&)>&}]::<lambda(const auto:10& ...)>&&)’
In file included from /home/rbrugo/git/lift/test/tests.cpp:14:
/home/rbrugo/git/lift/include/lift.hpp:270:5: note: ‘lift::when_any(Fs&& ...) [with Fs = {const lift::equal(T&&) [with T = int]::<lambda(const auto:3&)>&, const lift::equal(T&&) [with T = int]::<lambda(const auto:3&)>&}]::<lambda(const auto:10& ...)>::<lambda>(lift::when_any(Fs&& ...) [with Fs = {const lift::equal(T&&) [with T = int]::<lambda(const auto:3&)>&, const lift::equal(T&&) [with T = int]::<lambda(const auto:3&)>&}]::<lambda(const auto:10& ...)>&&)’ is not usable as a ‘constexpr’ function because:
270 | [funcs = std::tuple(std::forward<Fs>(fs)...)]
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
271 | (const auto& ... obj)
| ~~~~~~~~~~~~~~~~~~~~~
272 | noexcept(noexcept((std::forward<Fs>(fs)(obj...) || ...)))
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
273 | -> bool
| ~~~~~~~
274 | {
| ~
275 | return detail::when_any(
| ~~~~~~~~~~~~~~~~~~~~~~~~
276 | funcs,
| ~~~~~~
277 | std::index_sequence_for<Fs...>{},
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
278 | obj...
| ~~~~~~
279 | );
| ~~
280 | };
| ~
/home/rbrugo/git/lift/include/lift.hpp:270: confused by earlier errors, bailing out
make[2]: *** [test/CMakeFiles/self_test.dir/build.make:63: test/CMakeFiles/self_test.dir/tests.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:94: test/CMakeFiles/self_test.dir/all] Error 2
make: *** [Makefile:84: all] Error 2
https://github.com/rollbear/lift/blame/master/README.md#L182 names the result of negating 'std::less' 'binary_gt'. The suffix 'gt' seems to suggest 'greater than'.
Line 47 in a66b7f7
not that it is important, but style should be consistent! ;-)
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.