Skip to content
New issue

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

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

Already on GitHub? # to your account

Introduce algorithms sum and sum_if #67

Merged
merged 1 commit into from
Apr 29, 2024
Merged

Introduce algorithms sum and sum_if #67

merged 1 commit into from
Apr 29, 2024

Conversation

jesperkdab
Copy link
Collaborator

No description provided.

@jesperkdab jesperkdab requested a review from ivan-cukic April 26, 2024 07:59

// -------------------- sum --------------------
template <typename Container, typename Projection,
typename ReturnType = remove_cvref_t<detail::return_type_of_t<Projection>>>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OTOH, something like this would be more general:
std::result_of_t/invoke_result_t<Projection, typename Container::value_type>

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@jesperkdab jesperkdab merged commit 4a871d0 into main Apr 29, 2024
1 check passed
@jesperkdab jesperkdab deleted the sum-function branch April 29, 2024 09:14
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants