The idea of the state stack - if you're not familiar - is that the state base class contains a pointer to a state, which is nullptr by default. If the pointer is null then nothing special happens. Otherwise the state logic and drawing delegate to the sub-state indicated there.
I'm familiar with the state stack. However, I'm not using it for my StateMachine in this program. Although this state stack is a little different then what I'm used to. Are you saying that a State would look something like this?
template <typename T>
class State
{
private:
State<T>* sub_state;
public:
State() : sub_state{nullptr} {}
State(State<T>* sub) : sub_state{sub} {}
void update()=0;
//...
}