Hi,
I'd like to build something like this:
File 1:
template<typename Vector>
namespace myNamespace {
class myClass1{ myClass1(Vector v) {...} }
}
File 2:
template<typename Vector>
namespace myNamespace {
class myClass2{ myClass2(Vector v) {...} }
}
Of course this is not possible because you cannot template namespaces. Instead I could use a struct instead of a namespace, but then I cannot spread the namespace functions over several files.
Is there any solution for such a problem?
PS: I know I could template the classes, but then I'd have to specify which vector type I want to use anytime I create a new class.