I defined a function like this, in which there is a template template class
template cl
You don't really need template template parameter in the first place. You could make it
template
struct ForEachOf {
void operator()(const Map& map,
std::function func) const {
for(const auto& pair : map) {
func(pair.first, pair.second);
}
}
};
or even
template
void operator() (const Map& map, F func) const { ... }