Code review comment for lp:~chasedouglas/frame/v2

Revision history for this message
Jussi Pakkanen (jpakkane) wrote :

Forward declarations have one of the following two forms:

class Foo;
struct Foo;

What we have in the code is a type declaration. They must _not_ be duplicated. Ever. In this particular case an easy fix is to have a header such as basic_definitions.h which does not include anything and has the following contents:

class UFTouch;
// other forward declared classes here

typedef std::shared_ptr<const UFTouch_> SharedUFTouch_;
// other type declaration thingies here.

It can be included anywhere, is short, conflict-free and does not cause compilation slowdown.

« Back to merge proposal