Defining a certain member function
You should never really be doing any manual casting.
Virtual functions usually provide you with the functionality you are looking for.

How about:

struct State
{
    virtual void sing() = 0;
};

struct Drunk: State
{
    virtual void sing() { std::cout &lt;&lt; "Singing while drunk.\n"}
}

struct Sober: State
{
    virtual void sing() { std::cout &lt;&lt; "Singing Opera.\n"}
}

class Person
{
     std::auto_ptr&lt;State&gt;   state;
     public:
         Person()
            : state(new Sober)
         {}
         void sing()
         {
             state-&gt;sing();
         }
         void drink()
         {
             state.reset(new Drunk);
         }
         void sleep()
         {
             state.reset(new Sober);
         }
};


Then your code in main is even more trivial:

int main() {
    Person   bob;
    bob.drink();  // Don't allow manual changes in state.
                  // Provide actions that internally modify the state of your object.
    bob.sing(); 
    bob.sleep();
    bob.sing();
}



  This is just an example of course. In reality, I have states like FlySpellState, with the function flies(), which also seems to have no place in Person (since people cannot fly normally), though it could be.


Sure. So what you want is a bunch of different states. These states can all be changed when diffent situations apply.

struct Action
{
    virtual void doAction()  {std::cout &lt;&lt; "Nothing Happens\n";}
};

class Person
{

    std::map&lt;std::string, std::unique_ptr&lt;Action&gt;&gt;  actionMap;
    Action&amp; getAction(std::string const&amp; action)
    {
        static Action defaultAction;    // Will do Nothing by default.

        auto find = actionMap.find(action);
        return find == actionMap.end()
                  ? defaultAction
                  : *(find-&gt;second);
    }

    void sing()
    {
        getAction("sing").doAction();
    }
    void fly()
    {
        getAction("fly").doAction();  // Default do nothing unless you have read the scroll of flying
    }
    void drink()
    {
        actionMap["sing"].reset(new Drunk);
        actionMap["walk"].reset(new Stumble);
        actionMap["talk"].reset(new Slur);
    }
    void readScrollOfFlying()
    {
        actionMap["fly"].reset(new FlySpellState);
    }
};


Rather than using std::unique_ptr and lots of calls to new. You may want to look up the flyweight pattern.