Код: Выделить всё
auto dfs = [&](const auto &self, int x) -> void {
// ....
self(self, x);
};
dfs(dfs, 0);
Подробнее здесь: https://stackoverflow.com/questions/781 ... ambda-in-c
Код: Выделить всё
auto dfs = [&](const auto &self, int x) -> void {
// ....
self(self, x);
};
dfs(dfs, 0);