I have a templated class
template <T>
class Example
{
...
};
inside which there are many methods of the following type:
template <class U> <class V> method(....)
Inside these I use tr1::shared_ptr to U or V or T.
Its tedious typing tr1::shared_ptr<const U>
or tr1::shared_ptr<const V>
.
The obvious thing to do:
template <typename U>
typedef tr1::shared_ptr<U> shptr<U>;
does not work.
What do you do in this situation? Anything that can reduce verbosity?