template<typename T, typename U>
list<U*>& Hoge<T>::cast(list<T*>& a){
 /* checks the compatibility of U and T */
 if (!static_cast<U*>((T*)(1))){
  exit(0);
 } else {
  /* The cast */
  return *(reinterpret_cast<list<U*>*>(&a));
 }
}

オモロイつーかオソロシイつーか。
俺はlistが壊れる謎の現象のデバッグ中に
これを見つけて労働意欲が雲散霧消した。
ちなみに切り出して編集したから関数宣言とかは若干間違ってるかもしれん。
if文の条件式と条件式が真の時の動作に注目されたい。