diff --git a/include/clad/Differentiator/DynamicGraph.h b/include/clad/Differentiator/DynamicGraph.h index fc7c1ac83..e58a249d9 100644 --- a/include/clad/Differentiator/DynamicGraph.h +++ b/include/clad/Differentiator/DynamicGraph.h @@ -113,7 +113,7 @@ template class DynamicGraph { std::unordered_set visited; // Recursive function to print nodes with indentation based on depth. - auto printNode = [&](size_t nodeId, int depth) { + std::function printNode = [&](size_t nodeId, int depth) { // Check if the node has been visited already to avoid cycles. if (visited.find(nodeId) != visited.end()) return;