Figure 2: Implementation of the SAFETYPE operator- for unary negation

template<class T>
const SAFETYPE<T> SAFETYPE<T>::operator-()
{
   T t;
   SingleLock();
   t = -m_t;  
   SingleUnlock();
   return t;
}