I want to create typesafe structures that are basically identical but have different types so that they require different function signatures.
struct A {
Time t;
void doStuff(const A&);
A getStuff();
};
struct B {
Time t;
void doStuff(const B&);
B getStuff();
};
If I sue a template for the class
template<class T>
struct X {
Time t;
void doStuff(const X&);
X getStuff();
};
how can I make functions typesafe and define function signatures differently for a struct X of type A and a struct X of type B?