I\'d like to declare a function that returns a pointer to a function of the same type.
I would like to use it to implement state machines like the one below:
This is discussed in Herb Sutter's book More Exceptional C++, Item 32, where the answer seems to be (for C) "not without use of casts". For C++ it is possible with the usual introduction of a class to provide some extra indirection.