If one-time simple code changes are allowed, you can simply move the typedef to the deprecated namespace, requiring the use of using namespace deprecated at points that use typedef.
If this is not an option, it may be possible to come up with a template that generates a warning when creating the instance, but I do not know how to generate such a warning:
template <class T> class TypedefHolder; template <> class TypedefHolder<int> { typedef int WhateverType;
therefore instead of:
typedef int WhateverType;
he becomes:
typedef TypedefHolder<int>::WhateverType WhateverType;
Mark b
source share