D
daniel_rich
So I have a problem with some existing code, and I am trying to come
up with the cleanest way to handle it.
There is a templated class that was using specialization. Depending on
the type that the class is given the internals of the class were
identical for all versions that were specialized except they used a
different namespace.
template<class RegisterMapBase> class fooClass
{
public:
void foo();
}
void fooClass<RegisterMapA>::foo()
{
namespaceA::doFoo();
}
void fooClass<RegisterMapB>::foo()
{
namespaceB::doFoo();
}
We are handling multiple devices each of which has it's own namespace
for it's register map. Is there a clean way to handle this?
up with the cleanest way to handle it.
There is a templated class that was using specialization. Depending on
the type that the class is given the internals of the class were
identical for all versions that were specialized except they used a
different namespace.
template<class RegisterMapBase> class fooClass
{
public:
void foo();
}
void fooClass<RegisterMapA>::foo()
{
namespaceA::doFoo();
}
void fooClass<RegisterMapB>::foo()
{
namespaceB::doFoo();
}
We are handling multiple devices each of which has it's own namespace
for it's register map. Is there a clean way to handle this?