Forward declaration / when best to include headers?

Use forward declarations (as in your example) whenever possible. This reduces compile times, but more importantly minimizes header and library dependencies for code that doesn't need to know and doesn't care for implementation details. In general, no code other than the actual implementation should care about implementation details.

Here is Google's rationale on this: Header File Dependencies


When you use forward declaration, you explicitly say with it "class B doesn't need to know anything about internal implementation of class A, it only needs to know that class named A exists". If you can avoid including that header, then avoid it. - it's good practice to use forward declaration instead because you eliminate redundant dependencies by using it.

Also note, that when you change the header file, it causes all files that include it to be recompiled.

These questions will also help you:
What are the drawbacks of forward declaration?
What is the purpose of forward declaration?