maths: add sum
helper for containers
This commit is contained in:
parent
1fa4eba5d3
commit
5ca101acf3
@ -544,6 +544,13 @@ namespace cruft {
|
||||
return sum;
|
||||
}
|
||||
|
||||
template <concepts::named::container ContainerT>
|
||||
typename ContainerT::value_type
|
||||
sum (ContainerT const &src)
|
||||
{
|
||||
return sum (src.begin (), src.end ());
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
template <typename InputT>
|
||||
|
Loading…
Reference in New Issue
Block a user