"Jamie Burns" <re************@whatever.com> wrote...
I have an application which uses a class called "rSharedPointer". I want
to replace it with the Boost shared pointer but would like to keep the old
name and not modify any existing code.
I have tried doing the following:
typedef boost::shared_ptr<T> rSharedPointer;
and:
template<typename T> typedef boost::shared_ptr<T> rSharedPointer;
But it will not compile?
Any ideas?
If 'rSharedPointer' is a _class_, you cannot replace it with a template
in your code, the use for classes and templates is different. So, even
if there were (and there isn't) support for template typedefs, how would
you then use your 'rSharedPointer'?
If, contrary to your own words, 'rSharedPointer' is, in fact, a template,
then you could try using a macro:
#define rSharedPointer boost::shared_ptr
V