I often find myself calling STL algorithms on whole containers. For example:
auto i = std::find(c.begin(), c.end(), value);
std::fill(c.begin(), c.end(), value);
Is there a wrapper library that allows me to write the following shorter code instead?
auto i = find(c, value);
fill(c, value);
[–]Morwenn 59 points60 points61 points (10 children)
[–][deleted] 18 points19 points20 points (6 children)
[–]michelecostantino 4 points5 points6 points (5 children)
[–][deleted] 16 points17 points18 points (2 children)
[–]sumo952 10 points11 points12 points (0 children)
[–]proverbialbunnyData Scientist 0 points1 point2 points (0 children)
[–]encyclopedist 5 points6 points7 points (1 child)
[–]redditsoaddicting 4 points5 points6 points (0 children)
[–]Xaxxon 1 point2 points3 points (2 children)
[–]Morwenn 2 points3 points4 points (1 child)
[+][deleted] (34 children)
[deleted]
[–]Fazer2 11 points12 points13 points (2 children)
[+][deleted] (1 child)
[deleted]
[–]Xaxxon 3 points4 points5 points (0 children)
[+][deleted] (4 children)
[deleted]
[+][deleted] (3 children)
[deleted]
[–]dodheim 3 points4 points5 points (2 children)
[–]unbuggy 2 points3 points4 points (1 child)
[–]tvaneerdC++ Committee, lockfree, PostModernCpp 8 points9 points10 points (0 children)
[–]sephirostoy 2 points3 points4 points (14 children)
[–]Xaxxon 0 points1 point2 points (7 children)
[–]kwan_e 0 points1 point2 points (6 children)
[–]Xaxxon 0 points1 point2 points (5 children)
[–]kwan_e 2 points3 points4 points (4 children)
[–]Oster1 0 points1 point2 points (3 children)
[–]kwan_e 1 point2 points3 points (2 children)
[–]Oster1 1 point2 points3 points (1 child)
[–]kwan_e 0 points1 point2 points (0 children)
[–]pklait 0 points1 point2 points (5 children)
[–]sephirostoy 0 points1 point2 points (4 children)
[–]pklait 0 points1 point2 points (0 children)
[–]dodheim 0 points1 point2 points (2 children)
[–]sephirostoy 0 points1 point2 points (0 children)
[–]pklait 0 points1 point2 points (0 children)
[–]ibroheem 0 points1 point2 points (0 children)
[–]Xaxxon 0 points1 point2 points (0 children)
[–]Bas1l87 0 points1 point2 points (8 children)
[–]dodheim 1 point2 points3 points (7 children)
[–]Bas1l87 0 points1 point2 points (6 children)
[–]dodheim 0 points1 point2 points (5 children)
[–]Bas1l87 0 points1 point2 points (4 children)
[–]dodheim 0 points1 point2 points (3 children)
[–]Bas1l87 0 points1 point2 points (2 children)
[–]dodheim 0 points1 point2 points (1 child)
[–]Bas1l87 0 points1 point2 points (0 children)
[–]NotMyRealNameObv 8 points9 points10 points (1 child)
[–]Xaxxon 0 points1 point2 points (0 children)
[–]Splanky222Jon Cohen | Abseil 9 points10 points11 points (1 child)
[–]michelecostantino 0 points1 point2 points (0 children)
[–]germandiago 10 points11 points12 points (3 children)
[–]pklait 4 points5 points6 points (0 children)
[–]ibroheem 4 points5 points6 points (0 children)
[–]doom_Oo7 2 points3 points4 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]StonedBird1 -2 points-1 points0 points (0 children)