Originally I made a stack that took a abstract type of
no instance of overloaded function matches the argument list
ReigalaSplash splashScreen1(game); //gameState object declaration
gameStates.push(std::move(&splashScreen1)); //move to stack without copying
std::unique_ptr is designed to own heap memory, you're trying to give it stack memory.
What you'd like to do is:
std::unique_ptr<GameState> splashScreen1Ptr(new GameState(game)); gameStates.push(std::move(splashScreen1Ptr));