<p>Basically I have the following class:</p>

<pre><code>class StateMachine {
...
StateMethod stateA();
StateMethod stateB();
...
};
</code></pre>

<p>The methods stateA() and stateB() should be able return pointers to stateA() and stateB().
How to typedef the StateMethod?</p>

My philosophy is don't use raw member function pointers. I don't even really know how to do what you want using raw pointer typedef's the syntax is so horrible. I like using boost::function.
This is
almost
certainly wrong:
```
```
class X
{
  public:
    typedef const boost::function0<Method> Method;

    // some kind of mutually recursive state machine
    Method stateA()
    { return boost::bind(&X::stateB, this); }
    Method stateB()
    { return boost::bind(&X::stateA, this); }
};
```
```
This problem is definitely a lot harder than first meets the eye