I want to rename a templated class. To make the transition easier for the users, I'd like to keep the old class for one more version and mark it deprecated with the extensions from GCC / Clang (attribute deprecated). To avoid keeping an exact copy of the deprecated class, the use of template alias would be handy. Unfortunatley it does not seem to work. This is what I tried with Clang 3.3, GCC 4.7, and GCC 4.8:
template <class blabla>
struct NewClassName
{
// ...
};
template <class blabla> using OldClassName [[deprecated]]
= NewClassName<blabla>;
Do I miss something or is this just unsupported by the compilers? Is there an other idea to get deprecation warnings without copying the whole class?
using
. See here – Mccutchen