a refactoring to make it easier to use C++ closures

This commit is contained in:
Krasimir Angelov
2023-03-18 10:16:18 +01:00
parent edbfe25f87
commit f6d62c3d9b
4 changed files with 25 additions and 36 deletions

View File

@@ -658,7 +658,7 @@ void namespace_iter_prefix(Namespace<V> map, PgfText *prefix, PgfItor* itor, Pgf
}
template <class V>
Namespace<V> namespace_map(Namespace<V> map, std::function<ref<V>(ref<V>)> f)
Namespace<V> namespace_map(Namespace<V> map, std::function<ref<V>(ref<V>)> &f)
{
if (map != 0) {
auto left = namespace_map(map->left, f);