The last template parameter of many algorithm classes (Bfs, BfsVisit, Dfs, DfsVisit, Dijkstra, BellmanFord, Preflow, Circulation, MinCostArborescence) is a traits class. It is always shown in the doc, but it is typically not documented. This could be misleading, since the paramater seems to be mandatory.
A good solution would be to hide all these template parameters entirely.
If you run Preflow on a network in which the source node has some outgoing arcs of infinite capacity (represented by either the infinity() or the max() value of the type), then it will most likely cause problems, since the algorithm saturates these arcs.
Thus we should do one the followings:
Add a warning about this problem to the doc of the class and the dimacs solver.
Support infinite capacities in the algorithm (and in the dimacs solver as well). We could search for a finite cut and replace the infinite capacities on the outgoing arcs of the source node with the value of the found cut if such a cut exists. Otherwise the max. flow value is infinite.
A possible combination would be to choose the first solution and create a wrapper function/class for Preflow that supports infinite capacities applying the second solution.