1 2 3 4 5 6 7 8 9 10 11
#include <memory> #include "State.h" class Derived; class Base { Base(Derived &p_derived) : m_state(static_cast<Base>(p_derived).m_state){} std::shared_ptr<State> m_state; };
1 2 3
Line 18: error: State.h: No such file or directory Line 10: error: ISO C++ forbids declaration of 'shared_ptr' with no type compilation terminated due to -Wfatal-errors.