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.
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.