I have a large software framework which is currently living in a common namespace. Recently, I've moved some classes into nested namespaces, but in order to preserve backwards compatibility for the time being, I need to keep the names in the global namespace. So far, I'm using using
:
namespace framework {
namespace IO {
struct IStream;
}
#if COMPATIBILITY
using IO::IStream;
#endif
}
However, I could equally well use typedef IO::IStream IStream;
. Is there some advantage/disadvantage of using typedef
over using
?