When using unique_ptr
you need to explicitly define the class T
where-ever you declare the unique_ptr<T>
. I.e. include the header for the class GameState
, do not forward declare in the header game.h
.
This will get rid of error: invalid application of 'sizeof' to incomplete type 'GameState'
.
You can find more detailed answer here.