race.cpp: In function 'int best_path(int, int, int (*)[2], int*)':
race.cpp:73:35: error: expression list treated as compound expression in functional cast [-fpermissive]
73 | function<void(int, int, int, int) Calc = [&](int v, int pv, int dist, int depth) -> void {
| ^
race.cpp:73:87: error: template argument 1 is invalid
73 | function<void(int, int, int, int) Calc = [&](int v, int pv, int dist, int depth) -> void {
| ^~~~
race.cpp: In lambda function:
race.cpp:96:30: error: no match for call to '(std::function<void(int, int, int, int)>) (std::function<void(int, int, int, int)>&, std::tuple_element<0, std::pair<int, int> >::type&, int&, std::tuple_element<1, std::pair<int, int> >::type&, int)'
96 | Find(Find, u, v, w, 1);
| ^
In file included from /usr/include/c++/10/functional:59,
from /usr/include/c++/10/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/10/algorithm:74,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from race.cpp:1:
/usr/include/c++/10/bits/std_function.h:617:5: note: candidate: '_Res std::function<_Res(_ArgTypes ...)>::operator()(_ArgTypes ...) const [with _Res = void; _ArgTypes = {int, int, int, int}]'
617 | function<_Res(_ArgTypes...)>::
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/10/bits/std_function.h:617:5: note: candidate expects 4 arguments, 5 provided
race.cpp:97:14: error: 'Calc' was not declared in this scope
97 | Calc(Calc, u, v, w, 1);
| ^~~~
race.cpp:97:9: error: 'Calc' was not declared in this scope
97 | Calc(Calc, u, v, w, 1);
| ^~~~