You are viewing a single comment's thread. Return to all comments →
You can shave a couple of lines by using std::count_if and a lambda:
std::count_if
return count_if(m.begin(), m.end(), [&arr](decltype(m)::const_reference p) { return p.second == arr.size(); } );
Seems like cookies are disabled on this browser, please enable them to open this website
Gemstones
You are viewing a single comment's thread. Return to all comments →
You can shave a couple of lines by using
std::count_if
and a lambda: