Is it good to use nested classes or should I use namespaces instead?

In context:

I have a templated codec loader and a codec have In objects and Out objects

template<class TypeOfData>
class Codec
    {
    private:
        typename TypeOfData::In* reader;
        typename TypeOfData::Out* writer;
    };

On the other hand, I cannot use

using TypeOfData;

if i dont want to :: my way to a static method.

没有正确的解决方案

许可以下: CC-BY-SA归因
scroll top