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

Fix incorrect inference in bulk::sum and bulk::product #11

Merged
merged 3 commits into from
Oct 9, 2020

Conversation

tmaarse
Copy link
Contributor

@tmaarse tmaarse commented Oct 8, 2020

In the overloads of bulk::sum and bulk::product taking world references, this PR fixes std::accumulate specializing to int regardless of the argument types and adds a few tests.

This implementation requires that 1 can be cast to T in bulk::product, which can be fixed (we can reduce without a unit element), but I noticed this is also already the case for the other product overload.

@tmaarse tmaarse changed the title Fix incorrect inference in bulk::sum Fix incorrect inference in bulk::sum and bulk::product Oct 8, 2020
@jwbuurlage
Copy link
Owner

Great, thanks!

If you want, you can add yourself to the 'also thanks to' section of the README :)

CHANGELOG.md Outdated Show resolved Hide resolved
test/algorithm.cpp Outdated Show resolved Hide resolved
@tmaarse
Copy link
Contributor Author

tmaarse commented Oct 9, 2020

Thank you for the quick response and the library itself! If I have another PR I will add myself to the "also thanks to" section 😉

@jwbuurlage
Copy link
Owner

Thanks again! And please do 👍

@jwbuurlage jwbuurlage merged commit b793202 into jwbuurlage:develop Oct 9, 2020
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.

None yet

2 participants