I made a mistake in having the function CommonDelete after the struct declaration DeleteDestructor and so it crashed :O
Code:
template<typename T> struct DeleteDestructor
{
typedef CDestructor< T, CommonDelete<T> > type;
};
template<typename T> inline void CommonDelete(T& p) { delete p; }
Didn't work. What's worse is that it crashed
But it works as it should if we move them right.
Code:
template<typename T> inline void CommonDelete(T& p) { delete p; }
template<typename T> struct DeleteDestructor
{
typedef CDestructor< T, CommonDelete<T> > type;
};
Anyone crashed their compilers today?