I am looking to add a TerminatorFunc to undirected_depth_first_visit similar to what is in depth_first_visit.

 

I think I have successfully made the changes through mimicry (I am an old school C++ guy and still don't understand generic programming)

 

My problem is that I don't know how to declare/define my own terminate function. Nor do I know how to call undirected_depth_first_visit with the new argument. I have tried searching for examples of calling depth_first_visit with a TerminatorFunc argument, but can't find anything helpful.

 

Appreciate any suggestions you might have.