Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ add accumulate, enhance invoke and rename it to function #10

Merged
merged 3 commits into from
Dec 9, 2022

Conversation

lukevalenty
Copy link
Contributor

Some enhancements inspired by solving the 2022 advent of code problems with safe arithmetic.

@lukevalenty
Copy link
Contributor Author

wip

@lukevalenty lukevalenty marked this pull request as draft December 5, 2022 17:01
include/safe/algorithm/accumulate.hpp Outdated Show resolved Hide resolved
include/safe/algorithm/accumulate.hpp Outdated Show resolved Hide resolved
include/safe/function.hpp Show resolved Hide resolved
test/safe/invoke.cpp Show resolved Hide resolved
test/safe/dsl/add.cpp Show resolved Hide resolved
include/safe/detail/invoke.hpp Show resolved Hide resolved
include/safe/algorithm/accumulate.hpp Show resolved Hide resolved
include/safe/algorithm/accumulate.hpp Show resolved Hide resolved
include/safe/dsl/detail/checked.hpp Show resolved Hide resolved
@lukevalenty lukevalenty marked this pull request as ready for review December 6, 2022 17:51
@lukevalenty
Copy link
Contributor Author

The last commit adds some pretty loose concepts for ranges and iterators to help the compiler pick the correct safe::accumulate overload. these were added because the range-v3 library iterators are not compatible with the std iterator concepts. 😳

@lukevalenty lukevalenty merged commit 5e1ee2c into main Dec 9, 2022
@lukevalenty lukevalenty deleted the lukevalenty/advent_of_code branch December 9, 2022 01:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants